-
Bug
-
Resolution: Duplicate
-
Major
-
None
When i use a dir step inside the container step i get allways a
error:
ERROR: script returned exit code -2
Finished: FAILURE
jenkinsfile
#!/usr/bin/env groovy node { deleteDir() checkout scm def uniqueId = UUID.randomUUID().toString() stage('testing') { podTemplate( name: env.jaas_owner + '-jaas', label: uniqueId, containers: [ containerTemplate( name: 'busybox', image: 'busybox', command: 'cat' ) ] ) { node(uniqueId) { container('busybox') { sh ''' cd /var ls -al ''' dir ('/var'){ sh ''' cd /var ls -al ''' } } } } } }
- duplicates
-
JENKINS-46055 "dir" fails to use existing directory owned by root
-
- Open
-
- relates to
-
JENKINS-33510 dir('foo') inside "docker.image().inside{}" does not affect CWD of launched processes
-
- Resolved
-
[JENKINS-47305] Dir Step doesn't work inside container step when dir is outside the workspace
Summary | Original: Dir Step doesn't work inside container step | New: Dir Step doesn't work inside container step when dir is outside the workspace |
Description |
Original:
When i use a dir step inside the container step i get allways a error: ERROR: script returned exit code -2 Finished: FAILURE jenkinsfile {code:java} #!/usr/bin/env groovy node { deleteDir() checkout scm def uniqueId = UUID.randomUUID().toString() stage('testing') { podTemplate( name: env.jaas_owner + '-jaas', label: uniqueId, containers: [ containerTemplate( name: 'busybox', image: 'busybox', command: 'cat' ) ] ) { node(uniqueId) { container('busybox') { sh ''' cd /var ls -al ''' dir ('/var'){ sh ''' cd /var ls -al ''' } } } } } }{code} |
New:
When i use a dir step inside the container step i get allways a error: ERROR: script returned exit code -2 Finished: FAILURE jenkinsfile {code:java} #!/usr/bin/env groovy node { deleteDir() checkout scm def uniqueId = UUID.randomUUID().toString() stage('testing') { podTemplate( name: env.jaas_owner + '-jaas', label: uniqueId, containers: [ containerTemplate( name: 'busybox', image: 'busybox', command: 'cat' ) ] ) { node(uniqueId) { container('busybox') { sh ''' cd /var ls -al ''' dir ('/var'){ sh ''' cd /var ls -al ''' } } } } } }{code} |
Assignee | Original: Carlos Sanchez [ csanchez ] |
Please paste debug logs https://github.com/jenkinsci/kubernetes-plugin#debugging