Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jenkins multibranch pipeline does not respect quiet period in Jenkinsfile

I am using a Declarative Jenkinsfile with quiet period:

  options {
    quietPeriod(180)
    // more options
  }

Tool versions:

  • Jenkins - 2.190.3
  • Pipeline Multibranch Plugin - 2.21
  • Pipeline Declarative Plugin - 1.4.0

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.

like image 204
Dibakar Aditya Avatar asked Jan 18 '20 16:01

Dibakar Aditya


People also ask

How do you set a quiet period in Jenkins?

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.

What is the difference between pipeline and Multibranch pipeline in Jenkins?

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.


1 Answers

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

like image 83
alex Avatar answered Sep 27 '22 16:09

alex