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

If lock() creates a new resource, there should be a choice to make it temporary

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      I'm using lock() in the stage options of a declarative pipeline and really like the feature to automatically create the resource if it does not yet exist.  That should save some maintenance.  However as time goes on and resources change, this means the number of resources builds up until someone cleans them out.

      We should have a choice for manually created locks to be temporary - i don't necessarily care whether the resource exists when no one is using it, just that only one job use it at a time.

       

      May be related to: JENKINS-34892

       

      The overall scenario is related to Jenkins agents - I want a stage to deploy a server, followed by stages to execute client tests, but I need the server locked the whole time so that no other job tries to use it.  Currently I'm stuck with double maintenance, keeping the same server list in both the agent and the lockable resources.  If lock() both lets me create resources on the fly and declare them temporary so they are deleted when no one is using them, then I don't need duplicate maintenance - I only need to maintain the agents, not the lock data.

        Attachments

          Issue Links

            Activity

            wgc123 D Pasto created issue -
            wgc123 D Pasto made changes -
            Field Original Value New Value
            Link This issue is related to JENKINS-53332 [ JENKINS-53332 ]
            wgc123 D Pasto made changes -
            Link This issue is related to JENKINS-44141 [ JENKINS-44141 ]
            ethorsa ethorsa made changes -
            Remote Link This issue links to "PR#124 - Implement ephemeral lock support. (Web Link)" [ 23071 ]
            bozaro Artem V. Navrotskiy made changes -
            Remote Link Этот запрос связан с "PR#138 - Create implicit locks as ephemeral (Web-ссылка)" [ 23211 ]
            tgr Tobias Gruetzmacher made changes -
            Assignee Tobias Gruetzmacher [ tgr ]
            Resolution Fixed [ 1 ]
            Status Open [ 1 ] Fixed but Unreleased [ 10203 ]
            tgr Tobias Gruetzmacher made changes -
            Released As https://github.com/jenkinsci/lockable-resources-plugin/releases/tag/lockable-resources-2.6
            Status Fixed but Unreleased [ 10203 ] Resolved [ 5 ]

              People

              Assignee:
              tgr Tobias Gruetzmacher
              Reporter:
              wgc123 D Pasto
              Votes:
              4 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: