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.
Paraphrasing, and I wish this was in the docs somewhere, "Multibranch Pipeline job properties specified in a Jenkinsfile, e.g. triggers, agents.. have no effect until the job is run."
This is perhaps obvious to those with more experience with this plugin's SCM scanning feature.
Perhaps another good way to say it would be in the section that talks about the scanning feature to call out that "the scanning only looks at Jenkinsfile existence, it does not apply changes made inside Jenkinsfiles until they are run."