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

manually unlock "globally locked" resource early #638

Open
maks-io opened this issue Mar 21, 2024 · 0 comments
Open

manually unlock "globally locked" resource early #638

maks-io opened this issue Mar 21, 2024 · 0 comments

Comments

@maks-io
Copy link

maks-io commented Mar 21, 2024

What feature do you want to see added?

In my main Jenkins pipeline I am currently locking 2 resources via the pipeline's options, like so:

lock(variable: 'my-web-app', extra: [[resource: 'main-app'],[resource: 'health-check']])

Then i have another Jenkinsfile in a subfolder, just for a health-check of this web-app.

My main pipeline looks like this:
LockResources (see lock command above!) -> SendSlackMessage -> Install -> Build -> Deploy -> HealthCheck -> SendSlackMessage

In other words, my main app pipeline also triggers the HealthCheck pipeline in one of the stages - and waits for it to finish. But since the health check is blocked i had the idea of locking 2 resources:
One that blocks all health-checks, one that blocks all other builds for this web app (it is a multi branch pipeline, i don't want another branch to run in parallel).
Somehow i thought i could manually unlock the health-check resource right before the HealthCheck stage starts, but it seems there is no way to do so.
This would help me start the health-check as part of the main app pipeline without the need of also releasing the main-app resource, because if i did the latter, my queued build for other branches for the main app would start in the meantime, which is not what i want.

Long story short, i would like to see the possibility to manually unlock a resource, even if it was locked during the global options of a pipeline.

Upstream changes

No response

Are you interested in contributing this feature?

No response

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

No branches or pull requests

1 participant