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

Multibranch pipeline does not allow quiet time or throttle

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major Major
    • branch-api-plugin
    • None
    • Running jenkins 2.15 with pipeline-multibranch 2.8.
    • branch-api-plugin-2.6.0

      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.

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

          Brian Sipos created issue -
          Oleg Nenashev made changes -
          Component/s New: workflow-plugin [ 18820 ]
          Component/s Original: pipeline-_unsorted [ 21692 ]
          Oleg Nenashev made changes -
          Assignee Original: Oleg Nenashev [ oleg_nenashev ] New: Jesse Glick [ jglick ]

          Oleg Nenashev added a comment -

          Changed the component.
          Actually there are many throttling options in Pipeline, but Quite Period is definitely not one of them

          Oleg Nenashev added a comment - Changed the component. Actually there are many throttling options in Pipeline, but Quite Period is definitely not one of them

          Brian Sipos added a comment -

          My issue is with the multibranch pipeline though. I don't see any way to configure the multibranch job which will make use of job throttling on the auto-generated branch jobs.

          I see an option to "suppress automatic SCM triggering" but then the jobs will always need to be manually triggered. I don't see a way to have the auto-created per-branch job contain a "build periodically" or similar parameter. I just have a read-only view on the job configuration with unchecked options for "Build Triggers" section.

          Brian Sipos added a comment - My issue is with the multibranch pipeline though. I don't see any way to configure the multibranch job which will make use of job throttling on the auto-generated branch jobs. I see an option to "suppress automatic SCM triggering" but then the jobs will always need to be manually triggered. I don't see a way to have the auto-created per-branch job contain a "build periodically" or similar parameter. I just have a read-only view on the job configuration with unchecked options for "Build Triggers" section.
          Andrew Bayer made changes -
          Component/s New: pipeline-general [ 21692 ]
          Andrew Bayer made changes -
          Component/s Original: workflow-plugin [ 18820 ]

          Andras Gaal added a comment -

          Oleg could please share some documentation regarding the throttling options of multipipeline?

          Andras Gaal added a comment - Oleg could please share some documentation regarding the throttling options of multipipeline?

          Jesse Glick added a comment -

          try: Pipeline Syntax » properties » Throttle builds (have not personally ever used it)

          Jesse Glick added a comment - try: Pipeline Syntax » properties » Throttle builds (have not personally ever used it)

          Andras Gaal added a comment -

          Thanks Jesse,

          I missed "Pipeline Syntax » properties" somehow. I will try to test "Throttle builds".

          However not all the options are listed there. For example I could set up 'upstream' project. With this code:

          properties([
            pipelineTriggers([
              upstream(
                threshold: hudson.model.Result.SUCCESS,
                upstreamProjects: 'jobB'
              )
            ])
          ])
          

          I got this code from a comment somewhere.

          Is there a documentation somewhere? Or where is the related code where I can find it out?

          Thanks,
          Andras

          Andras Gaal added a comment - Thanks Jesse, I missed "Pipeline Syntax » properties" somehow. I will try to test "Throttle builds". However not all the options are listed there. For example I could set up 'upstream' project. With this code: properties([ pipelineTriggers([ upstream( threshold: hudson.model.Result.SUCCESS, upstreamProjects: 'jobB' ) ]) ]) I got this code from a comment somewhere. Is there a documentation somewhere? Or where is the related code where I can find it out? Thanks, Andras

            Unassigned Unassigned
            bsipos Brian Sipos
            Votes:
            51 Vote for this issue
            Watchers:
            59 Start watching this issue

              Created:
              Updated: