jenkinsci / jenkinsci/lockable-resources-plugin
Locking pipeline without using executors
- Dominant language
- Java
- Stars
- 99
- Forks
- 205
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 8
Description
### What feature do you want to see added?
I run Jenkins in a kubernetes environment. I am trying to lock an entire pipeline so it runs as a single unit. I need this because I have multiple levels of priority of jobs, and need to be able to block execution of jobs in more than the single way allowed by the build-blocker plugin.
When running a simple pipeline like this:
```
pipeline {
agent any
options{
lock(resource: "shared_resource_lock",quantity:1,priority:0)
}
stages {
stage("test") {
steps {
sh("sleep 300")
}
}
}
}
```
If I have ten executors and build ten of these simultaneously, all ten executors will be busy, with 9 of them waiting on locks and blocking other buildable jobs. I would like the lock interpreted before being assigned an executor so that it's waiting in the queue and not blocking other buildable jobs.
### Upstream changes
_No response_
### Are you interested in contributing this feature?
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.