Search code examples
jenkinsclearcasemaster-slavesnapshot-view

How does a job can access a drive on a node, another job has mapped before?


I have configured a Jenkins master slave system with one master and two slaves. Every job is bound to a particular node. Some jobs are triggering others and those need the information of the first ones.

E.g. Job A is built on node A, creates a snapshot view (Clearcase) and connects it to the drive r:. Then it triggers job B, which is built on node A, too, and has to use the data of the view. Because there was a problem with access to Clearcase, the Jenkins slaves (Windows services) are logged on as an existing username and not as the default system user.

I thought that job B should have access to drive r:\, because job A and job B are on the same node with the same service and user. But although job A has created and mapped everything correctly and I can see these files when I log on to the server manually, job B can’t find the files.

Where is the mistake? Is it possible that a job can access a drive another job has mapped?

Thanks for every hint and help.

Sarah


Solution

  • Jenkins allows different types of slaves. When you run the slave as service, the process has different session. The drives mapped in other sessions will not be applicable to it.

    You can run jenkins slave in other modes such as "Swarm plugin", running a command on the slave machine (JNLP).