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

PipelineTriggersJobProperty / pipelineTriggers() - snippet generator and syntax doc fail

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • Jenkins 2.18
      Latest plugins installed as of 8-17-16

      I was looking to use the new ability to trigger builds from a multi-branch project on a schedule.

      To try to use it, I went to look for the docs for how to use it, but both the snippet generator and the doc failed.

      For example, when you go to try to generate the trigger with a schedule of "H/15 * * * *", it generated the following:

      properties [pipelineTriggers([]), [$class: 'RebuildSettings', autoRebuild: false, rebuildDisabled: false], [$class: 'ThrottleJobProperty', categories: [], limitOneJobWithMatchingParams: false, maxConcurrentPerNode: 0, maxConcurrentTotal: 0, paramsToUseForLimit: '', throttleEnabled: false, throttleOption: 'project']]

      So I then went to look at the pipeline syntax - but on that page, I then found the following:
      {{$class: 'PipelineTriggersJobProperty'
      triggers
      Array/List:
      java.lang.UnsupportedOperationException: do not know how to categorize attributes of type hudson.triggers.Trigger<?>
      }}

      I am also attaching a screenshot

          [JENKINS-37477] PipelineTriggersJobProperty / pipelineTriggers() - snippet generator and syntax doc fail

          Greg Smith created issue -
          Greg Smith made changes -
          Link New: This issue is related to JENKINS-34005 [ JENKINS-34005 ]
          Matthew DeTullio made changes -
          Component/s New: workflow-multibranch-plugin [ 21465 ]
          Component/s Original: multi-branch-project-plugin [ 21127 ]
          Matthew DeTullio made changes -
          Assignee Original: Matthew DeTullio [ mjdetullio ] New: Jesse Glick [ jglick ]

          Greg Smith added a comment -

          In the meantime, if anyone could give me an example of how you would configure a the project property "Build Periodically" – I would be appreciative.

          With no snippet generator or syntax docs, I can not seem to find how to do this in any documentation.

          Greg Smith added a comment - In the meantime, if anyone could give me an example of how you would configure a the project property "Build Periodically" – I would be appreciative. With no snippet generator or syntax docs, I can not seem to find how to do this in any documentation.

          Daniel Beck added a comment -

          abayer Didn't you work in this area recently?

          Daniel Beck added a comment - abayer Didn't you work in this area recently?

          Andrew Bayer added a comment -

          I did - I'll dig into this.

          And in the meantime - gregcovertsmith - this should work for you:

          properties([pipelineTriggers([cron('H/15 * * * *')])])
          

          Andrew Bayer added a comment - I did - I'll dig into this. And in the meantime - gregcovertsmith - this should work for you: properties([pipelineTriggers([cron( 'H/15 * * * *' )])])
          Andrew Bayer made changes -
          Assignee Original: Jesse Glick [ jglick ] New: Andrew Bayer [ abayer ]

          Greg Smith added a comment -

          One other thing I'll mention: The ability to choose "Build after other projects build" in the pipeline triggers snippet generator seem to be missing.

          I'm not sure if this is related or not - but maybe there's some kind of conflict between that option and the other new pipeline triggers that cause the docs / snippet generator to fail?

          I know that option was available recently, and is now gone.

          Anyway — thought I would add a list of the current properties values that I can currently see in the snippet generator, in case that give some clue to issue.

          Greg Smith added a comment - One other thing I'll mention: The ability to choose "Build after other projects build" in the pipeline triggers snippet generator seem to be missing. I'm not sure if this is related or not - but maybe there's some kind of conflict between that option and the other new pipeline triggers that cause the docs / snippet generator to fail? I know that option was available recently, and is now gone. Anyway — thought I would add a list of the current properties values that I can currently see in the snippet generator, in case that give some clue to issue.
          Greg Smith made changes -
          Attachment New: Screen Shot 2016-08-22 at 9.36.12 AM.png [ 33686 ]

            abayer Andrew Bayer
            gregcovertsmith Greg Smith
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: