[JIRA] (JENKINS-37588) Multibranch pipeline does not allow quiet time or throttle

26 views
Skip to first unread message

felix.barros@gmail.com (JIRA)

unread,
Mar 9, 2017, 10:05:03 AM3/9/17
to jenkinsc...@googlegroups.com
Felix Barros updated an issue
 
Jenkins / Improvement JENKINS-37588
Multibranch pipeline does not allow quiet time or throttle
Change By: Felix Barros
Summary: Multibranch pipleine pipeline does not allow quiet time or throttle
Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)
Atlassian logo

adam.krapfl@pearson.com (JIRA)

unread,
May 8, 2018, 2:40:03 PM5/8/18
to jenkinsc...@googlegroups.com
Adam Krapfl commented on Improvement JENKINS-37588
 
Re: Multibranch pipeline does not allow quiet time or throttle

I feel there are legitimate use cases for this.  Jesse Glick can you explain why this is no longer needed?  I'm struggling to come up with alternative approaches in a Jenkinsfile without a quiet period.

fdrueke@orga-systems.com (JIRA)

unread,
Jun 6, 2018, 5:30:04 AM6/6/18
to jenkinsc...@googlegroups.com

Kohsuke described the quiet feature in this (old) article.

I still find that it is valid and needed (especially for longer builds).

fdrueke@orga-systems.com (JIRA)

unread,
Jun 6, 2018, 5:31:03 AM6/6/18
to jenkinsc...@googlegroups.com
Felix Drueke edited a comment on Improvement JENKINS-37588
Kohsuke described the quiet feature in this (old) [article|https://jenkins.io/blog/2010/08/11/quiet-period-feature/   ].


I still find that it is valid and needed (especially for longer builds).

levin.semen@gmail.com (JIRA)

unread,
Sep 4, 2018, 5:45:05 AM9/4/18
to jenkinsc...@googlegroups.com

We have quite complex dependencies and really need throttling options in Jenkinsfile...

This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

johnstosh@gmail.com (JIRA)

unread,
Oct 9, 2018, 10:07:09 AM10/9/18
to jenkinsc...@googlegroups.com

We have one project which needs a large quiet time while multiple commits are manually handled. But all the other projects have simple atomic commits. So we're in this battle of setting the global quiet time to 6 minutes vs 1 minute.

So this feature would help. I'd run two Jenkins masters to solve the issue, but that hits other snags. We have several Jenkins worker machines that are needed for all these projects and the workers can't be shared among multiple masters.

 

 

jglick@cloudbees.com (JIRA)

unread,
Oct 9, 2018, 10:17:01 AM10/9/18
to jenkinsc...@googlegroups.com

Was already implemented for Declarative Pipeline (JENKINS-51227), but is apparently not available in Scripted.

jglick@cloudbees.com (JIRA)

unread,
Oct 9, 2018, 10:20:08 AM10/9/18
to jenkinsc...@googlegroups.com

johnstosh@gmail.com (JIRA)

unread,
Oct 9, 2018, 12:50:02 PM10/9/18
to jenkinsc...@googlegroups.com

We do already use rate limiting (1 build at a time).

Well, the Declarative Pipeline support might work for me. I'll have to get a new Jenkins version ...

We're using multibranch pipelines.

 

pipeline {
    agent any
    options {| | | | quietPeriod(15)| | | | }

johnstosh@gmail.com (JIRA)

unread,
Oct 9, 2018, 2:52:02 PM10/9/18
to jenkinsc...@googlegroups.com

Ah, okay, as Jesse commented on the other issue: "Nothing to do with Declarative vs. Scripted, only multibranch vs. standalone."

 

options {
    buildDiscarder(logRotator(numToKeepStr: '90', artifactNumToKeepStr: '5'))
    retry(1)
    skipDefaultCheckout()
    disableConcurrentBuilds()
    quietPeriod(600)
}

 
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
WorkflowScript: 350: Invalid option type "quietPeriod". Valid option types: [buildDiscarder, catchError, disableConcurrentBuilds, overrideIndexTriggers, retry, script, skipDefaultCheckout, skipStagesAfterUnstable, timeout, timestamps, waitUntil, withContext, withCredentials, withEnv, ws] @ line 350, column 9.
quietPeriod(600)
^

General error during semantic analysis: There's no @DataBoundConstructor on any constructor of class jenkins.model.GlobalQuietPeriodConfiguration

org.kohsuke.stapler.NoStaplerConstructorException: There's no @DataBoundConstructor on any constructor of class jenkins.model.GlobalQuietPeriodConfiguration
at org.kohsuke.stapler.ClassDescriptor.loadConstructorParamNames(ClassDescriptor.java:265)
at org.jenkinsci.plugins.structs.describable.DescribableModel.<init>(DescribableModel.java:122)

johnstosh@gmail.com (JIRA)

unread,
Oct 9, 2018, 3:27:03 PM10/9/18
to jenkinsc...@googlegroups.com

Ooph, my bad.  I didn't make sure to update Declarative to version 1.3.2

It looks like it is accepting the quietPeriod now, after updating blue ocean.

yan@sutoiku.com (JIRA)

unread,
Nov 26, 2018, 8:59:02 AM11/26/18
to jenkinsc...@googlegroups.com

As noticed by Jesse Glick comment-350957 this does not seem to be available in Scripted pipelines. Are there any plans for that ?

oliver@teqneers.de (JIRA)

unread,
Sep 23, 2019, 8:42:03 AM9/23/19
to jenkinsc...@googlegroups.com

A very important hint is, that the quietPeriod option has to be written WITHOUT braces:

so instead of writing:

quietPeriod(600)

you need to write:

quietPeriod 600

jenkins will not give you a notice, warning or anything alike when using it with braces.

 

 

This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

oliver@teqneers.de (JIRA)

unread,
Sep 23, 2019, 9:14:14 AM9/23/19
to jenkinsc...@googlegroups.com
Oliver Mueller updated an issue
 
Change By: Oliver Mueller
Comment: A very important hint is, that the quietPeriod option has to be written *WITHOUT* braces:

so instead of writing:
{code:java}
quietPeriod(600){code}
you need to write:
{code:java}
quietPeriod 600{code}

jenkins will not give you a notice, warning or anything alike when using it with braces.

 

 

oliver@teqneers.de (JIRA)

unread,
Sep 23, 2019, 9:34:03 AM9/23/19
to jenkinsc...@googlegroups.com
 
Re: Multibranch pipeline does not allow quiet time or throttle

We are using Declarative version 1.3.9 and quietPeriod does not seem to work:

options {
 quietPeriod 1200
 timeout(time: 4, unit: 'HOURS')
 disableConcurrentBuilds()
}

The pipeline will get executed immediately.

 

 

oliver@teqneers.de (JIRA)

unread,
Sep 23, 2019, 10:21:04 AM9/23/19
to jenkinsc...@googlegroups.com
Oliver Mueller edited a comment on Improvement JENKINS-37588
We are using   Jenkins 2.195, Multibranch 2.21 and Declarative version 1.3.9 and .

Option 
quietPeriod seems to be accepted, but it does not NOT seem to work .

We are using a declarative multibranch pipeline with these options
:  
{code:java}
pipeline {
  agent any
options {
quietPeriod 1200
timeout(time: 4, unit: 'HOURS')
disableConcurrentBuilds()
}

...
{code}

The pipeline will get executed immediately.

javi@zinamic.com (JIRA)

unread,
Oct 9, 2019, 2:40:04 AM10/9/19
to jenkinsc...@googlegroups.com

we are facing the same problem (Jenkins 2.190.1, Multibranch 2.21 and Declarative 1.3.9).

The quietPeriod option seems to be working when calling the job from another job by sending the branch name in the URL "/projects/Build-MultibranchProject/master", but it does not work when the webhook calls the Multibranch project. 

Multibranch plugin seems to be executing the required branch job doing a "Build now" and it bypasses the quietPeriod options.

 

 

vincenzo.cerbone@gmail.com (JIRA)

unread,
Jan 7, 2020, 6:51:03 PM1/7/20
to jenkinsc...@googlegroups.com

Successfully tested with Declarative (Jenkins 2.200) but had no luck to set it in Scripted fashion. As someone stated before, there's no way neither to get it generated with pipeline-syntax generator, nor trying something like this:

properties([
    pipelineTriggers([
				[
					$class: 'HudsonStartupTrigger',
					quietPeriod: '2'
				]
			])
])

will produce:

 no known implementation of class hudson.triggers.Trigger is named HudsonStartupTrigger

dibakar.aditya@gmail.com (JIRA)

unread,
Jan 26, 2020, 11:33:04 PM1/26/20
to jenkinsc...@googlegroups.com

vincenzo cerbone, did you see any success using this in a multibranch pipeline project? In our setup, the Declarative syntax with standalone pipeline project works as intended, not in multibranch yet.

dibakar.aditya@gmail.com (JIRA)

unread,
Jan 26, 2020, 11:34:03 PM1/26/20
to jenkinsc...@googlegroups.com
Dibakar Aditya edited a comment on Improvement JENKINS-37588
[~vincenzo_cerbone], did you see any success using this in a multibranch pipeline project? In our setup, the Declarative syntax with standalone pipeline project works as intended, but not in multibranch yet. This functionality is much needed, especially with the maven release plugin.

vincenzo.cerbone@gmail.com (JIRA)

unread,
Jan 27, 2020, 4:21:14 AM1/27/20
to jenkinsc...@googlegroups.com

Dibakar Aditya I tested it (Declarative) in multibranch as Oliver Mueller reported and I had luck to see it working. Unfortunately I needed it to work in scripted mode because JTE (Jenking Template Engine) does not support Declarative.
I ended up using this instruction and it works!

}}{{currentBuild.rawBuild.getParent().setQuietPeriod(10){{}}

About maven-release-plugin, I prefer not to use it anymor. Now I'm using :
https://github.com/aleksandr-m/gitflow-maven-plugin{{}}

dibakar.aditya@gmail.com (JIRA)

unread,
Jan 31, 2020, 3:20:07 AM1/31/20
to jenkinsc...@googlegroups.com

vincenzo cerbone, tried both the Declarative and Scripted approach that you suggested on Jenkins 2.204.1 with the latest version of plugins. Though the I can see the quiet period being set in the job configuration page of the branch, multibranch still chooses to ignore it.

dibakar.aditya@gmail.com (JIRA)

unread,
Jan 31, 2020, 4:01:04 AM1/31/20
to jenkinsc...@googlegroups.com
Dibakar Aditya edited a comment on Improvement JENKINS-37588
[~vincenzo_cerbone], I have tried both the Declarative and Scripted approach that you suggested on Jenkins 2.204.1 with the latest version of plugins. Though the I can see the quiet period being set in the job configuration page of the branch, multibranch still chooses to ignore it.
Reply all
Reply to author
Forward
0 new messages