docker-inbound-agent
docker-inbound-agent copied to clipboard
FileNotFoundException on readProperties when job is scheduled on slave
I launch a docker container with jenkinsci/docker-jnlp-slave image.
When jenkins master delegate a pipeline job to this agent I get a
java.io.FileNotFoundException: /home/jenkins/agent/workspace/Anagrafica_master/application.properties (No such file or directory)
I use this command to read a pros file
props = readProperties file: 'application.properties'
But if I enter in the container I see it, and the user jenkins is its owner:
jenkins@a9cdf4e47885:~$ ls -al /home/jenkins/agent/workspace/Anagrafica_master/application.properties
-rw-r--r--. 1 jenkins jenkins 243 Mar 1 16:13 /home/jenkins/agent/workspace/Anagrafica_master/application.properties
How could be possible?