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

Make WorkflowJob.concurrentBuild into a JobProperty

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Component/s: pipeline
    • Labels:
      None
    • Similar Issues:

      Description

      As described in JENKINS-30519.

        Attachments

          Issue Links

            Activity

            Hide
            sid_s Sid S added a comment -

            How do users use this in their Jenkinsfile? Can't seem to find any documentation on this ...

            Show
            sid_s Sid S added a comment - How do users use this in their Jenkinsfile? Can't seem to find any documentation on this ...
            Hide
            jglick Jesse Glick added a comment -

            See Pipeline Syntax for properties.

            Show
            jglick Jesse Glick added a comment - See Pipeline Syntax for properties .
            Hide
            valentin92 Valentin Chartier added a comment -

            @Jesse : Are you refering to this "Pipeline Syntax" document https://jenkins.io/doc/book/pipeline/syntax/ ?
            Can you point where it addresses the issue ?

            Show
            valentin92 Valentin Chartier added a comment - @Jesse : Are you refering to this "Pipeline Syntax" document https://jenkins.io/doc/book/pipeline/syntax/ ? Can you point where it addresses the issue ?
            Hide
            jglick Jesse Glick added a comment -

            no, the live version inside Jenkins

            Show
            jglick Jesse Glick added a comment - no, the live version inside Jenkins
            Hide
            sid_s Sid S added a comment -

            Jesse Glick: Why won't you mention the actual syntax here instead of RTFM?

            Valentin Chartier: The syntax inside the jenkins' install itself suggests

            properties([disableConcurrentBuilds(), pipelineTriggers([])])

            I'm not sure why we need to pass the blank pipelineTriggers([]) ... but that's what it says

            Show
            sid_s Sid S added a comment - Jesse Glick : Why won't you mention the actual syntax here instead of RTFM? Valentin Chartier : The syntax inside the jenkins' install itself suggests properties([disableConcurrentBuilds(), pipelineTriggers([])]) I'm not sure why we need to pass the blank pipelineTriggers([]) ... but that's what it says
            Hide
            jglick Jesse Glick added a comment -

            I'm not sure why we need to pass the blank pipelineTriggers([])

            You do not.

            Show
            jglick Jesse Glick added a comment - I'm not sure why we need to pass the blank pipelineTriggers([]) You do not.
            Hide
            sid_s Sid S added a comment - - edited

            Jesse Glick: When trying to make the entire operation contained in the Jenkinsfile single instanced, do we stick that inside the node block, outside the node block or inside/outside every stage block?

            Putting it inside the node block doesn't seem to prevent concurrent builds.

            node

            { properties([disableConcurrentBuilds()]) // stages are here }
            Show
            sid_s Sid S added a comment - - edited Jesse Glick : When trying to make the entire operation contained in the Jenkinsfile single instanced, do we stick that inside the node block, outside the node block or inside/outside every stage block? Putting it inside the node block doesn't seem to prevent concurrent builds. node { properties([disableConcurrentBuilds()]) // stages are here }
            Hide
            jglick Jesse Glick added a comment -

            properties should generally be at the very start of a Jenkinsfile.

            Show
            jglick Jesse Glick added a comment - properties should generally be at the very start of a Jenkinsfile .

              People

              • Assignee:
                abayer Andrew Bayer
                Reporter:
                jglick Jesse Glick
              • Votes:
                2 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: