Hi David,
Did you ever find a nice solution to this problem? I would also like to
lock builds for projects with multiple branches / PRs, but don't want to
mess with using lockable resources (which seems to be the only solution
right now that works with pipeline code, but it requires you define a
resource for each project)
Cheers,
Greg
On Thursday, May 12, 2016 at 4:23:50 PM UTC-4, David wrote:
>
> I have a Jenkinsfile in my repo, and one of the stages uses resources
> shared across every branch, but I need to limit it to only one build at a
> time. It seems that if two branches are being built simultaneously, they
> don't respect the concurrency parameter and end up using the shared
> resource at the same time.
>
> I'd like the branch builds to wait until the other branch is out of that
> shared stage before entering, which is what i thought the concurrency
> parameter would do.
>
> stage name: 'Source code checkout'
> node {
> checkout scm
> }
>
> // Tests reuse the same resources
> // I thought setting concurrency to 1 would avoid multiple branch builds
> stepping on each other
> stage name: 'Test', concurrency: 1
> node {
> // This doesn't seem to be limited to one branch build at a time
> // How can I achieve that?
> }
>
>
>
--
You received this message because you are subscribed to the Google Groups
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/175f7dcb-82a3-41d0-afae-f86c2391b4a9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.