Hi,

Am Freitag, 4. Oktober 2019 02:03:17 UTC+2 schrieb Tim Black:
>
> We have a multibranch pipeline job set up to scan a git repo (which 
> contains Jenkinsfile at its root) for branches and create branch-specific 
> jobs for each branch discovered. The Jenkinsfile on a branch specifies:
>
>     triggers {
>         cron('@midnight')
>     }
>
> and this indeed runs nightly at midnight. However, when I delete the above 
> block and commit the Jenkinsfile to my branch, it appears to have no 
> effect. Last night the build still ran at midnight. This is my problem.
>
> I confirmed the change by looking on the branch job configuration page and 
> indeed see an empty BuildTriggers section. There are no triggers specified 
> and none of the trigger checkboxes are checked.
>
> Please confirm whether this is indeed the way I am supposed to disable a 
> trigger specified in a multibranch pipeline Jenkinsfile. 
>
>

The update to the job config for changes made in the jenkinsfile only 
happen once  the jobs runs (before that point, the jenkinsfile is neither 
fetched nor evaluated). So if you changed the trigger today, then it would 
run once tonight and should stop starting after that.  To get the effect 
more immedeatly, you could trigger the job manually.

Björn

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/4cffef7d-70ec-4f79-8714-780725d90059%40googlegroups.com.

Reply via email to