I am using a Declarative Jenkinsfile with quiet period:
options {
quietPeriod(180)
// more options
}
Tool versions:
Now the issue is that on GitHub SCM changes, a standalone pipeline project respects the quiet period but a multibranch pipeline project does not. It returns no error either, just triggers the build immediately on receiving webhooks.
I am aware of the open issue JENKINS-37588 on this.
Using upstream wrapper jobs with build(job: 'my-job', quietPeriod: 180)
is not feasible since I have several hundred multibranch projects.
Has anyone been able to find a solution or workable alternative? Any help will be appreciated.
Step 1: Go to the Configure system page and set the time period that you want to set a Quiet period like in the below image. After putting time, click on the Save button. Step 2: Now run any job by clicking on the Build Now link twice.
Jenkins Pipeline Vs. Multibranch Pipeline. A multibranch pipeline is meant for building multiple branches from a repository and deploy to multiple environments if required. A pipeline job supports both pipeline steps to be added in Jenkins configuration and form SCM.
I think - unfortunately - this is currently not possible.
There is an unresolved ticket here: https://issues.jenkins-ci.org/browse/JENKINS-37588
Also there is already an open pull request for this issue: https://github.com/jenkinsci/branch-api-plugin/pull/190
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With