Sample Code:
timestamps { -> node('build && docker') {
stage 'MAVEN 3.2 (win)'
getDockerImage('maven:3.2').inside {
sh 'mvn -v'
}
stage 'MAVEN 3.3 (fail)'
getDockerImage('maven:3.3').inside {
sh 'mvn -v'
}
}}
def getDockerImage(imageName) {
return { ->
def img = docker.image(imageName)
/* make sure we have the up-to-date image */
img.pull()
/* dance around https://issues.jenkins-ci.org/browse/JENKINS-34276 */
return docker.image(img.imageName())
}()
}
The 3.2 stage runs just fine but the 3.3 stage fails with:
[Pipeline] stage (MAVEN 3.3 (fail))
17:23:27 Entering stage MAVEN 3.3 (fail)
17:23:27 Proceeding
[Pipeline] sh
17:23:27 [maven-3-point-3] Running shell script
17:23:27 + docker pull maven:3.3
17:23:29 3.3: Pulling from library/maven
17:23:29 Digest: sha256:f6becf58234086fa8cbfa89a38917ed3bec81baaac4465c3275d51ec22b60461
17:23:29 Status: Downloaded newer image for maven:3.3
[Pipeline] sh
17:23:29 [maven-3-point-3] Running shell script
17:23:30 + docker inspect -f . maven:3.3
17:23:30 .
[Pipeline] withDockerContainer
17:23:30 $ docker run -t -d -u 1000:1000 -w /var/lib/jenkins/workspace/JCHRISTEN/maven-3-point-3 -v /var/lib/jenkins/workspace/JCHRISTEN/maven-3-point-3:/var/lib/jenkins/workspace/JCHRISTEN/maven-3-point-3:rw -v /var/lib/jenkins/workspace/JCHRISTEN/maven-3-point-3@tmp:/var/lib/jenkins/workspace/JCHRISTEN/maven-3-point-3@tmp:rw -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** maven:3.3 cat
[Pipeline] {
[Pipeline] sh
17:23:31 [maven-3-point-3] Running shell script
17:23:31 Error response from daemon: Container c744a6e4b7ecfc61ceb9d9c88c9af070309ea44d47e38f5b4ece06ecce6fdb17 is not running
[Pipeline] }
17:23:49 $ docker stop c744a6e4b7ecfc61ceb9d9c88c9af070309ea44d47e38f5b4ece06ecce6fdb17
17:23:49 $ docker rm -f c744a6e4b7ecfc61ceb9d9c88c9af070309ea44d47e38f5b4ece06ecce6fdb17
[Pipeline] // withDockerContainer
[Pipeline] }
[Pipeline] // node
[Pipeline] }
[Pipeline] // timestamps
[Pipeline] End of Pipeline
ERROR: script returned exit code -2
Finished: FAILURE
This used to work. In my opinion this kind of breakage is unacceptable and is the direct result of this image being far too opinionated (doing too much at startup).
This problem was originally identified in #14 which seems to have been summarily dismissed. Please reconsider.
Sample Code:
The 3.2 stage runs just fine but the 3.3 stage fails with:
This used to work. In my opinion this kind of breakage is unacceptable and is the direct result of this image being far too opinionated (doing too much at startup).
This problem was originally identified in #14 which seems to have been summarily dismissed. Please reconsider.