Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-37588

Multibranch pipeline does not allow quiet time or throttle

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Component/s: branch-api-plugin
    • Labels:
      None
    • Environment:
      Running jenkins 2.15 with pipeline-multibranch 2.8.
    • Similar Issues:

      Description

      Currently, for an individual pipeline job I can set a quiet time to avoid one-for-one commit-to-build ratio when there are many commits in a short time. I like to use the multibranch plugin to allow branch automation, but there does not appear to be a way for a multibranch config (either the meta-job itself or from within a Jenkinsfile) to define a quiet time or some other ability to throttle job runs.

        Attachments

          Issue Links

            Activity

            Hide
            jglick Jesse Glick added a comment -

            Rate limiting is possible, though, as far as I know.

            Show
            jglick Jesse Glick added a comment - Rate limiting is possible, though, as far as I know .
            Hide
            johnstosh John Muczynski added a comment -

            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)| | | | }
            Show
            johnstosh John Muczynski added a comment - 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)| | | | }
            Hide
            johnstosh John Muczynski added a comment -

            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)

            Show
            johnstosh John Muczynski added a comment - 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)
            Hide
            johnstosh John Muczynski added a comment -

            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.

            Show
            johnstosh John Muczynski added a comment - 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.
            Hide
            yanstoic753 Yan Corneille added a comment -

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

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

              People

              • Assignee:
                Unassigned
                Reporter:
                bsipos Brian Sipos
              • Votes:
                33 Vote for this issue
                Watchers:
                37 Start watching this issue

                Dates

                • Created:
                  Updated: