It would be great to have an option that when an older build finally gets a lock it can skip it because a newer build already completed it. Example: Start build 1 Start build 2 build 2 reaches locked block build 1 reaches locked block build 2 executes locked block (eg sonarqube scanner or deployment) build 2 frees the lock build 1 gets the lock build 1 skips block in the lock because a newer build already completed it
As far as I understand this cannot be done right now. Would be really handy to have this.
Regarding the documentation, the concurrency property of a Stage (which is now deprecated) could exactly do this:
The stage command lets you mark certain sections of a build as being constrained by limited concurrency (or, later, unconstrained). Newer builds are always given priority when entering such a throttled stage; older builds will simply exit early if they are preëmpted.
This seems to need quite a lot of tracking and I currently consider this out of scope for the lockable-resources plugin. Feel free to reopen if you think otherwise.