I have a Jenkins multi-configuration project that I want to build on two slaves (Slave-1 and Slave-2) which are located on two different VM's. I am having a problem with how Jenkins attempts to create different workspaces for each slave. I want to use the same workspace path on each VM.
I am getting my project files from Perforce and want to put them in the directory c:\workspace on both VM's. However when I run a build, I look on the VM that has Slave-1 and it stores the project files under:
c:\workspace\label\Slave-1
On the other VM the project files is under:
c:\workspace\label\Slave-2
The folder 'label' under c:\workspace was the slave name I input for the configuration matrix.
How do I override Jenkins to put my project files under c:\workspace on each VM (without the \label\Slave_name folders)? I understand Jenkins does this to avoid confusion but my workspaces are on completely different VM's that won't interact with each other in any way. I have to use the c:\workspace directory in order to build properly.
Best Answer
You can start Jenkins with extra params:
-Dhudson.model.Slave.workspaceRoot=c:\workspace
Taken from here: https://issues.jenkins-ci.org/browse/JENKINS-12667