Was watching the new release notes for some plugins, and happened to find 
this:

JENKINS-34547 <https://issues.jenkins-ci.org/browse/JENKINS-34547> 
Converted concurrency setting to a job property, allowing it to be defined 
in a multibranch Jenkinsfile via the properties step.

It looks like it is now possible to set concurrency so that it does go 
across all branches -- though I'm not sure how to use it yet, seems very 
promising.

Cheers,
Greg


On Tuesday, July 26, 2016 at 9:15:57 PM UTC-4, David wrote:
>
> I never found a good solution, but I am using the lockable resources 
> plugin (
> https://wiki.jenkins-ci.org/display/JENKINS/Lockable+Resources+Plugin). I 
> didn't need to define each resource manually:
>
> When the lock step is used in a Pipeline, if the resource to be locked 
>> isn't already defined in the Jenkins global configuration, it'll be set up 
>> automatically.
>
>
> On Tuesday, July 26, 2016 at 7:49:21 PM UTC-4, Greg Smith wrote:
>>
>> 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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/60360a11-eff1-4420-98e0-c293d0d1af59%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to