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

Add workflow support for resource locking

    Details

    • Similar Issues:

      Description

      Add support to use this plugin from workflow to manage concurrent consumption of resources.

      Similar to how stage step works as blocked scoped to control concurrency of other builds for this job running this step at the same time, it would be useful to be able to do this for resources across jobs.

      Continue to allow the resources to be set up in the Jenkins configuration.

      Consumption of resources should be controlled with a syntax along these lines:

      For a single resource:

      resource (name: db-a-1, reservedVariable: DB_RESOURCE) {

      // Do something here that uses the resource

      echo “DB Resource(s) used = $DB_RESOURCE”
      }

      For a pool of resources sharing a label:

      resource (label: db-a, quantity: 2, reservedVariable: DB_RESOURCE) {

      // Do something here that uses the resource

      echo “DB Resource(s) used = $DB_RESOURCE”
      }

        Attachments

          Issue Links

            Activity

            nharniman Nigel Harniman created issue -
            nharniman Nigel Harniman made changes -
            Field Original Value New Value
            Description Add support to use this plugin from workflow to manage concurrent consumption of resources.

            Similar to how {{stage}} step works as blocked scoped to control concurrency of other builds for this job running this step at the same time, it would be useful to be able to do this for resources across jobs.

            Continue to allow the resources to be set up in the Jenkins configuration.

            Consumption of resources should be controlled with a syntax along these lines:

            For a single resource:

            resource (name: db-a-1, reservedVariable: DB_RESOURCE) {
            // Do something here that uses the resource
            echo “DB Resource(s) used = $DB_RESOURCE”
            }

            For a pool of resources sharing a label:

            resource (label: db-a, quantity: 2, reservedVariable: DB_RESOURCE) {
            // Do something here that uses the resource
            echo “DB Resource(s) used = $DB_RESOURCE”
            }

            Add support to use this plugin from workflow to manage concurrent consumption of resources.

            Similar to how {{stage}} step works as blocked scoped to control concurrency of other builds for this job running this step at the same time, it would be useful to be able to do this for resources across jobs.

            Continue to allow the resources to be set up in the Jenkins configuration.

            Consumption of resources should be controlled with a syntax along these lines:

            For a single resource:

            resource (name: db-a-1, reservedVariable: DB_RESOURCE) {

            // Do something here that uses the resource

            echo “DB Resource(s) used = $DB_RESOURCE”
            }

            For a pool of resources sharing a label:

            resource (label: db-a, quantity: 2, reservedVariable: DB_RESOURCE) {

            // Do something here that uses the resource

                    echo “DB Resource(s) used = $DB_RESOURCE”
            }

            nharniman Nigel Harniman made changes -
            Description Add support to use this plugin from workflow to manage concurrent consumption of resources.

            Similar to how {{stage}} step works as blocked scoped to control concurrency of other builds for this job running this step at the same time, it would be useful to be able to do this for resources across jobs.

            Continue to allow the resources to be set up in the Jenkins configuration.

            Consumption of resources should be controlled with a syntax along these lines:

            For a single resource:

            resource (name: db-a-1, reservedVariable: DB_RESOURCE) {

            // Do something here that uses the resource

            echo “DB Resource(s) used = $DB_RESOURCE”
            }

            For a pool of resources sharing a label:

            resource (label: db-a, quantity: 2, reservedVariable: DB_RESOURCE) {

            // Do something here that uses the resource

                    echo “DB Resource(s) used = $DB_RESOURCE”
            }

            Add support to use this plugin from workflow to manage concurrent consumption of resources.

            Similar to how {{stage}} step works as blocked scoped to control concurrency of other builds for this job running this step at the same time, it would be useful to be able to do this for resources across jobs.

            Continue to allow the resources to be set up in the Jenkins configuration.

            Consumption of resources should be controlled with a syntax along these lines:

            For a single resource:

            resource (name: db-a-1, reservedVariable: DB_RESOURCE) \{

            // Do something here that uses the resource

            echo “DB Resource(s) used = $DB_RESOURCE”
            }
             
            For a pool of resources sharing a label:
             
            resource (label: db-a, quantity: 2, reservedVariable: DB_RESOURCE) \{

            // Do something here that uses the resource

                    echo “DB Resource(s) used = $DB_RESOURCE”
            }

            jglick Jesse Glick made changes -
            Issue Type Improvement [ 4 ] New Feature [ 2 ]
            jglick Jesse Glick made changes -
            Link This issue is duplicated by JENKINS-30757 [ JENKINS-30757 ]
            jglick Jesse Glick made changes -
            Link This issue is related to JENKINS-29892 [ JENKINS-29892 ]
            amuniz Antonio Muñiz made changes -
            Assignee Antonio Muñiz [ amuniz ]
            amuniz Antonio Muñiz made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            jglick Jesse Glick made changes -
            Link This issue is related to JENKINS-29207 [ JENKINS-29207 ]
            amuniz Antonio Muñiz made changes -
            Remote Link This issue links to "PR (Web Link)" [ 14203 ]
            amuniz Antonio Muñiz made changes -
            Status In Progress [ 3 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]
            amuniz Antonio Muñiz made changes -
            Link This issue is related to JENKINS-34268 [ JENKINS-34268 ]
            nharniman Nigel Harniman made changes -
            Link This issue is related to JENKINS-34273 [ JENKINS-34273 ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 165362 ] JNJira + In-Review [ 197700 ]
            abayer Andrew Bayer made changes -
            Labels workflow pipeline workflow
            abayer Andrew Bayer made changes -
            Labels pipeline workflow pipeline

              People

              • Assignee:
                amuniz Antonio Muñiz
                Reporter:
                nharniman Nigel Harniman
              • Votes:
                9 Vote for this issue
                Watchers:
                21 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: