-
Improvement
-
Resolution: Unresolved
-
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.