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

job-dsl has deprecated concurrentBuild() on pipeline jobs

    Details

    • Similar Issues:
    • Released As:
      Job DSL 1.71

      Description

      Per https://github.com/jenkinsci/job-dsl-plugin/wiki/Migration#migrating-to-170, and warnings in the console on seed jobs, concurrentBuild() is deprecated for pipeline jobs. Is this is error? concurrent builds can certainly be enabled/disabled on pipeline jobs.

        Attachments

          Issue Links

            Activity

            Hide
            schniedergers Klaus Schniedergers added a comment -

            When looking into the config.xml, it seems that it's still `<concurrentBuild>false</concurrentBuild>` - so what should the replacement be for the supposedly-deprecated `concurrentBuild(false)` in pipeline jobs?

            Show
            schniedergers Klaus Schniedergers added a comment - When looking into the config.xml, it seems that it's still `<concurrentBuild>false</concurrentBuild>` - so what should the replacement be for the supposedly-deprecated `concurrentBuild(false)` in pipeline jobs?
            Hide
            schniedergers Klaus Schniedergers added a comment -

            Workaround:

            pipelineJob('jobname') {
                configure {
                    (it / 'concurrentBuild').setValue('false')
                }
            
            Show
            schniedergers Klaus Schniedergers added a comment - Workaround: pipelineJob( 'jobname' ) { configure { (it / 'concurrentBuild' ).setValue( ' false ' ) }
            Hide
            mooncrosser Grigor Lechev added a comment -

            I believe this is the new correct way to do it:

            pipelineJob("name") {
                properties {
                    disableConcurrentBuilds()
                }
                ...
            
            Show
            mooncrosser Grigor Lechev added a comment - I believe this is the new correct way to do it: pipelineJob( "name" ) { properties { disableConcurrentBuilds() } ...
            Hide
            schniedergers Klaus Schniedergers added a comment -

            Thanks, that seems to work, Grigor Lechev.

            Show
            schniedergers Klaus Schniedergers added a comment - Thanks, that seems to work, Grigor Lechev .

              People

              • Assignee:
                daspilker Daniel Spilker
                Reporter:
                jhoblitt Joshua Hoblitt
              • Votes:
                6 Vote for this issue
                Watchers:
                9 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: