You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be ideal to create an arbitrary lock and use it for a period of time, and optionally delete it. Having a self-creating and self-deleting lock would give the ability to lock resources which definitions change frequently but is already tracked in code.
Example usage could look like:
def app_name = 'my-awesome-app'
// ...snip...
lock(resource: "${app_name}:staging", ephemeral: true) {
// ... lock created and acquired... deploy this app to the staging environment
}
// by this point the lock is released and destroyed
where the lock name my-awesome-app:staging would be created and reserved by the pipeline, and once the lock is out of scope it is deleted. Maybe even allow someone the ability to control create and delete actions: lock(resource: ..., create: true, delete: false) { ... }
I realize this is very similar to #103 but didn't want to hijack that conversation for something that has clearly different features (but also a lot of overlap).
The text was updated successfully, but these errors were encountered:
wagoodman
changed the title
Create and remove locks within a jenkinsfile
Feature Request: Create and remove locks within a jenkinsfile
May 21, 2018
It would be ideal to create an arbitrary lock and use it for a period of time, and optionally delete it. Having a self-creating and self-deleting lock would give the ability to lock resources which definitions change frequently but is already tracked in code.
Example usage could look like:
where the lock name
my-awesome-app:staging
would be created and reserved by the pipeline, and once the lock is out of scope it is deleted. Maybe even allow someone the ability to control create and delete actions:lock(resource: ..., create: true, delete: false) { ... }
I realize this is very similar to #103 but didn't want to hijack that conversation for something that has clearly different features (but also a lot of overlap).
The text was updated successfully, but these errors were encountered: