Issue
I am currently learning the ins and outs of Jenkins and Pipeline. One thing I do not yet understand is the following:
A Jenkins job by default can be executed concurrently (I can check the checkbox "Do not allow concurrent builds" if I don't want that).
What I don't understand is the following:
Let say Jenkins checks out code in /var/lib/jenkins/workspace/my-project-workspace/
Now how would it be possible to run concurrent builds without conflicts? Let's say that build nr 1 checks out code in that path and starts testing it, and while doing that, build nr 2 is started and checks out code in that same path. How will that not conflict with build nr 1? I am probably missing something obvious here... Please help :)
Solution
The subdirectory inside the workspace/
folder will not always be your project name, but a (randomly) generated directory name. That's all the magic.
Answered By - StephenKing