-
Type: Problem
-
Status: Open
-
Priority: Minor
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: Jenkins X
sh: /home/jenkins/workspace/XP-27430-platorm-simple-pipeline@tmp/durable-cdf22e09/jenkins-log.txt: Permission denied sh: /home/jenkins/workspace/XP-27430-platorm-simple-pipeline@tmp/durable-cdf22e09/jenkins-result.txt.tmp: Permission denied touch: cannot touch ‘/home/jenkins/workspace/XP-27430-platorm-simple-pipeline@tmp/durable-cdf22e09/jenkins-log.txt’: Permission denied mv: cannot stat ‘/home/jenkins/workspace/XP-27430-platorm-simple-pipeline@tmp/durable-cdf22e09/jenkins-result.txt.tmp’: No such file or directory touch: cannot touch ‘/home/jenkins/workspace/XP-27430-platorm-simple-pipeline@tmp/durable-cdf22e09/jenkins-log.txt’: Permission denied touch: cannot touch ‘/home/jenkins/workspace/XP-27430-platorm-simple-pipeline@tmp/durable-cdf22e09/jenkins-log.txt’: Permission denied
The agent used is "jenkins-maven-java11-nuxeo" which creates a jenkins user and uses it in the Docker image, see https://github.com/nuxeo/nuxeo-jenkins-x-builders/blob/bde46e5a713ed07d6a1ff33db26a56acc7bb35fd/builder-maven-java11-nuxeo/Dockerfile
We want to run the pipelines as jenkins to not be as root.
It seems that the scm checkout is not done in the builder's container, thus not as jenkins, creating the /home/jenkins/workspace directory with insufficient permission for the jenkins user.