-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
jenkins:2.60.3
pipeline-model-definition:1.2.5
Stages execute using docker with customWorkspace use the correct directory.
Example pipeline:
pipeline { agent { label 'docker_host' } stages { stage('create file') { steps { dir('subdir') { sh 'touch newFileInSubDir' } } } stage('Test file exists in subdir') { agent { docker { image 'debian:stable-slim' reuseNode true customWorkspace 'subdir' } } steps { sh "ls -laR" sh "test -f newFileInSubDir" } } } post { always { deleteDir() } } }
This fails on the last test. I would expect it to succeed or if customWorkspace is not supported, then the script validation should fail.
- is duplicated by
-
JENKINS-53711 Pipeline customWorkspace not obeyed in docker agent when reuseNode is true
-
- Fixed but Unreleased
-
This doesn't surprise me, sadly - Docker Pipeline (which is what's used behind the scenes for Declarative's Docker agent) doesn't work with custom workspaces.