docker-inbound-agent icon indicating copy to clipboard operation
docker-inbound-agent copied to clipboard

FileNotFoundException on readProperties when job is scheduled on slave

Open matteoturra opened this issue 5 years ago • 0 comments

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?

matteoturra avatar Mar 01 '19 17:03 matteoturra