Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Create and remove locks within a jenkinsfile #104

Closed
wagoodman opened this issue May 21, 2018 · 4 comments
Closed

Feature Request: Create and remove locks within a jenkinsfile #104

wagoodman opened this issue May 21, 2018 · 4 comments

Comments

@wagoodman
Copy link

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).

@wagoodman wagoodman changed the title Create and remove locks within a jenkinsfile Feature Request: Create and remove locks within a jenkinsfile May 21, 2018
@shantur
Copy link

shantur commented Mar 1, 2019

I have implemented this in #124

@clonejo
Copy link
Contributor

clonejo commented Jul 22, 2019

So this issue can be closed?

@TobiX
Copy link
Contributor

TobiX commented Jul 23, 2019

Will be in the next release, see #138.

@TobiX TobiX closed this as completed Jul 23, 2019
@shantur
Copy link

shantur commented Sep 19, 2019

@TobiX : When is the next release, I am waiting for this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants