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

Useless context for snippet generator in MBPL folder

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      When accessing a multi-branch pipeline's snippet generator, the context is the multibranch folder, not an individual pipeline job.

      This results in the triggers section for prooperties to have the folder's triggers, which are misleading to pipeline creators.

      This should show a branch pipeline's applicable triggers instead.

      Use case (i.e. "why not just access the branch project?"):
      Access to MBPL snippet generator before having Jenkinsfiles. Sort of a chicken/egg problem.

        Attachments

          Issue Links

            Activity

            danielbeck Daniel Beck created issue -
            danielbeck Daniel Beck made changes -
            Field Original Value New Value
            Epic Link JENKINS-35393 [ 171186 ]
            Show
            danielbeck Daniel Beck added a comment - Came up in https://botbot.me/freenode/jenkins/2016-12-08/?msg=77693236&page=8 until https://botbot.me/freenode/jenkins/2016-12-08/?msg=77694239&page=9
            Hide
            stephenconnolly Stephen Connolly added a comment -
            Show
            stephenconnolly Stephen Connolly added a comment - Jesse Glick FYI
            Hide
            jglick Jesse Glick added a comment -

            Indeed.

            At a minimum, PipelineTriggersJobProperty/config.jelly needs to ignore an it which is not in fact a Job, to avoid offering unusable properties. CC Andrew Bayer.

            Ideally from the folder, we would show triggers applicable to WorkflowJob. Unfortunately this is impossible using current core APIs: TriggerDescriptor.isApplicable takes an Item not a Class<? extends Item>. We could inspect the type parameter of the Trigger (klazz), though this is less precise.

            If there is already at least one branch project, we could try to redirect to its pipeline-syntax/ page.

            Show
            jglick Jesse Glick added a comment - Indeed. At a minimum, PipelineTriggersJobProperty/config.jelly needs to ignore an it which is not in fact a Job , to avoid offering unusable properties. CC Andrew Bayer . Ideally from the folder, we would show triggers applicable to WorkflowJob . Unfortunately this is impossible using current core APIs: TriggerDescriptor.isApplicable takes an Item not a Class<? extends Item> . We could inspect the type parameter of the Trigger ( klazz ), though this is less precise. If there is already at least one branch project, we could try to redirect to its pipeline-syntax/ page.
            jglick Jesse Glick made changes -
            Component/s core [ 15593 ]
            Component/s workflow-job-plugin [ 21716 ]
            Component/s pipeline [ 21692 ]
            Labels multibranch api pipeline trigger
            jglick Jesse Glick made changes -
            Link This issue relates to JENKINS-46286 [ JENKINS-46286 ]
            abayer Andrew Bayer made changes -
            Labels api pipeline trigger api pipeline triaged-2018-11 trigger
            abayer Andrew Bayer made changes -
            Assignee Andrew Bayer [ abayer ]
            abayer Andrew Bayer made changes -
            Assignee Andrew Bayer [ abayer ]

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              danielbeck Daniel Beck
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated: