When writing a Build Runner Plugin, how do I force the build configuration to limit the number of simultaneously running builds to 1?

Hi :)

I'm writing a Build Runner Plugin, i.e. the type of plugin described here: http://confluence.jetbrains.net/display/TCD7/Build+Runner+Plugin

I need a way to force the build option "Limit the number of simultaneously running builds" to be 1.  This is because the Build Runner Plugin uses a resource on the network, such that if two builds run concurrently they will interfere with each other, therefore I need to stop this happening.

What's the best way to do this?

Thanks in advance!

Comment actions Permalink

Hi David

Our Groovy plugin provides this functionality by system.locks.readLock.<lockName> property.
Probably you can use it as is, together with your custom build runner. But source code is open, so you can reuse the logic.

Would be great if you share youк plugin with the community.


Comment actions Permalink

Thanks :)  I've got this working now.


Please sign in to leave a comment.