-
Bug
-
Resolution: Duplicate
-
Major
-
None
-
CloudBees Docker Workflow 1.2
Jenkins ver. 1.625.3.1 (CloudBees Jenkins Enterprise 15.11)
withCredentials(FileBinding){...} is ignored in docker.image('cloudbees:java-build-tools').inside{...}. The same withCredentials step works in 'standard' linux node.
See logs below.
It seems to be because FileBinding#secretsDir() creates a "secretFiles" directory under "node.getRootPath()" that is not 'mounted' in the docker container.
withCredentials(FileBinding){...} ignored in docker.image(...).inside{...}
docker.image('busybox').inside{ withCredentials([[$class: 'FileBinding', credentialsId: 'secret-file', variable: 'SECRET_FILE']]) { sh 'ls -al $SECRET_FILE' } }
Started by user Cyrille Le Clerc [Pipeline] Allocate node : Start Running on vagrant in /home/vagrant/jenkins/workspace/test-credentials-binding [Pipeline] node { [Pipeline] sh [test-credentials-binding] Running shell script + docker inspect -f . busybox . [Pipeline] Run build steps inside a Docker container : Start $ docker run -t -d -u 1000:1000 -w /home/vagrant/jenkins/workspace/test-credentials-binding -v /home/vagrant/jenkins/workspace/test-credentials-binding:/home/vagrant/jenkins/workspace/test-credentials-binding:rw -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** busybox cat [Pipeline] withDockerContainer { [Pipeline] Bind credentials to variables : Start [Pipeline] withCredentials { [Pipeline] sh [test-credentials-binding] Running shell script + ls -al **** ls: ****: No such file or directory
- duplicates
-
JENKINS-27152 Store sh control files outside of workspace
- Resolved