-
Bug
-
Resolution: Fixed
-
Critical
-
None
-
kubernetes1.8.4 jenkins 2.32.3(fabric8/jenkins-docker) jenkins kubernetes plugin 1.3.1
I am using kubernetes plugin to build my ci environment on a kubernetes cluster. There is a pipeline block like below:
stage ('Compile client & go src') {
dir('./src/main/docker/go/src/portal') {
sh "pwd; \
cd /home/jenkins/workspace/portal_v3.0/src/main/docker/go/src/portal/; \
export GOPATH=${env.WORKSPACE}/src/main/docker/go; \
gvt restore || true"
}
}
but the sh block fails from time to time. In the console output there are even incomplete log like this:
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (Compile client & go src)
[Pipeline] dir
Running in /home/jenkins/workspace/portal_v3.0/src/main/docker/go/src/portal
[Pipeline] {
[Pipeline] sh
[portal] Running shell script
Executing shell script inside container [maven] of pod [kubernetes-jcl72]
Executing command: sh -c echo $$ > '/home/jenkins/workspace/portal_v3.0/src/main/docker/go/src/portal@tmp/durable-ed3533f2/pid'; jsc=durable-d2043139f4d662aef846252c818e1165; JENKINS_SERVER_COOKIE=$jsc '/home/jenkins/workspace/portal_v3.0/src/main/docker/go/src/portal@tmp/durable-ed3533f2/script.sh' > '/home/jenkins/workspace/portal_v3.0/src/main/docker/go/src/portal@tmp/durable-ed3533f2/jenkins-log.txt' 2>&1; echo $? > '/home/jenkins/workspace/portal_v3.0/src/main/docker/go/src/portal@tmp/durable-ed3533f2/jenkins-result.txt'
cd "/home/jenkins/workspace/portal_v3.0"
sh -c echo $$ > '/home/jenkins/workspace/portal_v3.0/src/main/docker/go/src/portal@tmp/durable-ed3533f2/pid'; jsc=durable-d2043139f4d662aef846252c818e1165; JENKINS_SERVER_COOKIE=$jsc '/home/jenkins/workspace/portal_v3.0/src/main/docker/go/src/portal@tmp/durable-ed3533f2/script.sh' > '/home/jenkins/workspace/portal_v3.0/src/main/docker/go/src/portal@tmp/durable-ed3533f2/jenkins-log.txt' 2>&1; echo $? > '/home/jenkins/wo[?1034hsh-4.2# [Pipeline] }
It the last line, the word "workspace" was truncated to "wo".
I tried 5 times. it fails 2 times and success 3 times.
I do not think it is a dupe of JENKINS-46545 because I have many time success
- depends on
-
JENKINS-50392 Use the right API to get process' exitcode
- Resolved