Hi Everyone - I have one master and one slave node.
I am trying to move some Jenkins jobs that currently run on the master to instead run on the slave. For various reasons, I need (or at least want) to use the $JENKINS_HOME env variable in my scripts, but it returns the value of the master jenkins localtion, even when running a job on the slave. On the master node, $JENKINS_HOME is /opt/apache-tomcat-7.0.54/webapps/jenkins On the slave node, $JENKINS_HOME should be /opt/jenkins, but is being returned as the master's value ( /opt/apache-tomcat-7.0.54/webapps/jenkins) For now, the best I have been able to do is climb up the directory hierarchy, using something like: $WORKSPACE/../../../.. So $WORKSPACE is returning the workspace location correctly on the slave, but $JENKINS_HOME is returning the jenkins installation folder on the master. Is this the expected behavior? Is there another env variable I should be using? Regardless, I have hundreds of Jenkins jobs, and tweaking them all will be painful if I can't simply modify $JENKINS_HOME on which they currently rely. I think it is an IT configuration issue, because they say that when they echo $JENKINS_HOME it gives the expected value on the slave node, as follows: [jenkins@builder01-slave01 ~]$ echo $JENKINS_HOME /opt/jenkins Maybe the Jenkins process was started as "root" and not as the "jenkins" user, and they've defined $JENKINS_HOME for the wrong user? If it is an IT-related configuration and not a Jenkins thing, please give advice and I'll rely it onto the IT dept, who control the server config. Thanks in advance Cheers Bruce -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/502de496-603d-4c3f-935a-a723c0821e6b%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.