-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Minor
-
Component/s: durable-task-plugin, pipeline
-
None
-
Environment:Ubuntu Xenial, Jenkins 2.239 with all plugins up-to-date
The following Jenkins works fine:
Â
pipeline {
agent none
stages {
stage('Test') {
agent {
docker {
image 'node:14-alpine'
alwaysPull true
}
}
steps {
sh 'pwd'
sh 'node --version'
}
}
}
}
Â
The following got some issues and it's stuck on "docker pull node:14-alpine" (from Blue Ocean view):
Â
Â
pipeline {
agent {
dockerfile {
filename 'docker/jenkins-agent/Dockerfile'
additionalBuildArgs "--build-arg UID=113"
}
}
stages {
stage('Test') {
agent {
docker {
image 'node:14-alpine'
alwaysPull true
}
}
steps {
sh 'node --version'
}
}
}
}
Â
When tried without "alwaysPull true", it got stuck on "docker inspect -f . node:14-alpine — Shell Script".
My Dockerfile:
Â
FROM ubuntu:focal AS ubuntu ENV DEBIAN_FRONTEND noninteractive # Creates a user. ARG UID=1001 RUN useradd -rm -d /home/jenkins -s /bin/bash -g root -u $UID jenkins USER jenkins WORKDIR /home/jenkins
Â
Jenkins output:
...
[Pipeline] withEnv
[Pipeline] {
[Pipeline] isUnix
[Pipeline] sh (
(hang)
Error after timeout (docker pull node:14-alpine — Shell Script):
process apparently never started in /var/lib/jenkins/workspace/Deploy@2@tmp/durable-75354819 (running Jenkins temporarily with -Dorg.jenkinsci.plugins.durabletask.BourneShellScript.LAUNCH_DIAGNOSTICS=true might make the problem clearer) script returned exit code -2
My understanding is when specifying "agent" inside "stage" it should override/replace the outer "agent", but it seems Jenkins got some issues with this configuration.