How to prevent concurrent builds across all branches in a multibranch pipeline project?

1,545 views
Skip to first unread message

Mark Allison

unread,
Aug 14, 2017, 6:37:39 AM8/14/17
to Jenkins Users
I have tried to use 

properties[(disableConcurrentBuilds)]

but that only prevents concurrent builds within one branch in a multibranch pipeline project. Is there a way to prevent concurrent builds across all branches in a project?

Thanks

Michael Pailloncy

unread,
Aug 14, 2017, 6:54:36 AM8/14/17
to jenkins...@googlegroups.com
Why do you want to prevent this ? Do you have a shared resource for all your builds ?
If yes, I think that this plugin will fit your needs https://wiki.jenkins.io/display/JENKINS/Lockable+Resources+Plugin 

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/f91f57d6-e39a-4abd-93e0-1a016434cc9f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mark Allison

unread,
Aug 14, 2017, 10:00:08 AM8/14/17
to Jenkins Users
Yes we have a database server for testing new database changes, and I want to serialise all database project builds across branches so they don't interfere. I will look into the lockable resources plugin.

Is there a way to tie an executor to a particular database server? For example have 10 executors and they will only run on against certain database servers.


On Monday, 14 August 2017 11:54:36 UTC+1, mpapo - Michael Pailloncy wrote:
Why do you want to prevent this ? Do you have a shared resource for all your builds ?
If yes, I think that this plugin will fit your needs https://wiki.jenkins.io/display/JENKINS/Lockable+Resources+Plugin 
2017-08-14 12:37 GMT+02:00 Mark Allison <marka...@gmail.com>:
I have tried to use 

properties[(disableConcurrentBuilds)]

but that only prevents concurrent builds within one branch in a multibranch pipeline project. Is there a way to prevent concurrent builds across all branches in a project?

Thanks

--
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-use...@googlegroups.com.

Viacheslav Dubrovskyi

unread,
Aug 14, 2017, 10:07:53 AM8/14/17
to jenkins...@googlegroups.com

Hi Mark,

You can use env.EXECUTOR_NUMBER in DB user name or in port of connection string.


14.08.2017 17:00, Mark Allison пишет:

For more options, visit https://groups.google.com/d/optout.

-- 
WBD,
Viacheslav Dubrovskyi
Reply all
Reply to author
Forward
0 new messages