• Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • Currently Jenkins 2.59

      Multibranch pipeline jobs scans for new branches and creates and removes jobs as needed. This is basically a good idea.

      Unfortunately, the scan triggers an immediate build of new jobs when they're found in SCM. In many situations, this is fine - but in some, this is a no-go. I have a lot of jobs that can only run during night as they interrupt services when they're running.

      I can avoid triggering the automatic build by setting the property "Suppress automatic SCM triggering" for all branches.

      But: By doing that, Jenkins doesn't read the Jenkinsfile and doesn't find a command like

      properties([pipelineTriggers([cron('H 5 * * *')])])

      that I have on top of my Jenkinsfiles. Thus the job will never build.

      If I get out of bed early in the morning and run the job once, Jenkins find the cron specification and runs the job properly afterwards.

      It would be very nice - and give me some extra sleep - if the triggers where read at scan time instead of the first run.

      Thanks in advance.

          [JENKINS-44172] Better scan of multibranch pipelines

          Lars Skjærlund created issue -
          Andrew Bayer made changes -
          Component/s New: branch-api-plugin [ 18621 ]
          Component/s Original: pipeline [ 21692 ]
          Stephen Connolly made changes -
          Component/s New: workflow-multibranch-plugin [ 21465 ]
          Component/s Original: branch-api-plugin [ 18621 ]
          Lorenz Aebi made changes -
          Rank New: Ranked higher

            Unassigned Unassigned
            larsskj Lars Skjærlund
            Votes:
            27 Vote for this issue
            Watchers:
            28 Start watching this issue

              Created:
              Updated: