Hi,
i am using a jenkins server with several (identical) slaves. These slaves execute a build pipeline.
Since the codebase is quite large, the jobs of the pipeline share a workspace which is only updated once by the first job. For the same reason, I don't use plugins that copy the workspace.
This setup mostly works, but runs into a problem once all slaves are busy and a new built is triggered:
-the first job will be queued until a slave finishes a job
-the finished job will trigger its successor which will be queued
-the queued first job then will be executed on the slave
-thereby it will update the workspace and afterwards trigger its successor which will be queued
-the previously queued job will start running; since its predecessor was running on an older version of the code it may or may not fail
-repeat
I tried to solve this problem using the throttle-concurrent-builds-plugin by using a category and limiting the number of concurrent builds of this category to one per node, but this did not help. After looking at the code, it seems that the plugin only checks the number of jobs currently running on a node, and not the ones waiting to run.
It seems that I need a plugin with wich I could explicitly lock a node in the first job and explicitly release the lock in the last job of the pipeline.
My question: is there a plugin that supports something like this? Or is there a simpler solution to my problem?
Thanks,
Christoph