Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-40304

Snippet generator does not generate valid code for ReverseBuildTrigger

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Duplicate
    • Component/s: core, workflow-job-plugin
    • Labels:
      None
    • Environment:
      Jenkins 2.7.1
      workflow-job-plugin 2.9
      workflow-multibranch-plugin 2.9.2
    • Similar Issues:

      Description

      Using the snippet generator to generate the code for a reverse build trigger generates code like this:

      properties([pipelineTriggers([upstream(threshold: <object of type hudson.model.Result>, upstreamProjects: 'foo')])])
      

      The Result object needs to be displayed as e.g. hudson.model.Result.SUCCESS.

      I'm not sure in which component this needs to be fixed; I've filed against core (which implements ReverseBuildTrigger) and workflow-job-plugin (which defines pipelineTriggers).

        Attachments

          Issue Links

            Activity

            Hide
            bmerry Bruce Merry added a comment -

            I've also just run a 2.19.4 Docker image and confirmed that the problem still exists there.

            Show
            bmerry Bruce Merry added a comment - I've also just run a 2.19.4 Docker image and confirmed that the problem still exists there.
            Hide
            danielbeck Daniel Beck added a comment -

            I can't get the reverse build trigger to show up in the snippet generator for a MBPL, there's just periodically and periodically if not otherwise. Any idea why?

            Could you provide detailed steps to reproduce from scratch?

            Show
            danielbeck Daniel Beck added a comment - I can't get the reverse build trigger to show up in the snippet generator for a MBPL, there's just periodically and periodically if not otherwise. Any idea why? Could you provide detailed steps to reproduce from scratch?
            Hide
            bmerry Bruce Merry added a comment -

            I also had trouble getting it to show up when starting with a fresh Docker image. I fiddled around creating jobs until it worked, but I didn't keep a record of what I did and I'm not sure what the magic combination was. I recall creating a freestyle job and a (non-multibranch) pipeline job, and possibly the snippet generator showed the option on that pipeline job rather than the MBPL I was trying to set up. In production the option shows up when I use the snippet generator on a MBPL though.

            Show
            bmerry Bruce Merry added a comment - I also had trouble getting it to show up when starting with a fresh Docker image. I fiddled around creating jobs until it worked, but I didn't keep a record of what I did and I'm not sure what the magic combination was. I recall creating a freestyle job and a (non-multibranch) pipeline job, and possibly the snippet generator showed the option on that pipeline job rather than the MBPL I was trying to set up. In production the option shows up when I use the snippet generator on a MBPL though.
            Hide
            danielbeck Daniel Beck added a comment -

            I learned yesterday that the correct triggers only show up on a MBPL branch job's snippet generator, not on the global one or the one shown for the MBPL folder project. I'm going to report that as a bug as well. Nobody wants to see a snippet generator with triggers for a folder project that cannot have a pipeline…

            Show
            danielbeck Daniel Beck added a comment - I learned yesterday that the correct triggers only show up on a MBPL branch job's snippet generator, not on the global one or the one shown for the MBPL folder project. I'm going to report that as a bug as well. Nobody wants to see a snippet generator with triggers for a folder project that cannot have a pipeline…

              People

              • Assignee:
                Unassigned
                Reporter:
                bmerry Bruce Merry
              • Votes:
                2 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: