Usage of GroovyPlug's Read/WriteLock to prevent parallel Builds?

Good morning,

I was looking for a way to prevent build B to be built while build A is running and saw on the forum that the GroovyPlug was suggested for a similiar usecase.. but.. how do I use it?

I have 5 configurations, and only one of them may run at any given point of time. Now what exactly do I have to specify under each configuration's 'Properties and Environment Variables' tab? I am somewhat lost :-/

Cheers and thanks,


Add system property to all of these configurations:

where <lockName> is the name of the shared resource.
Then when each configuration starts it will acquire write lock with given name. If another configuration already locked this resource, configuration will wait for the build of other configuration to finish.


Hey there Pavel,

thanks for the quick reply! Do I enter that locks.writeLock.somename in the 'Name' field or in the 'Value' field?



It should be name of the property. Value does not matter.


Please sign in to leave a comment.