Hi All
I have a jenkins pipeline step which simply logs in to google's docker container registry service and pushes the image.
The Build step is implemented as the following set of shell commands:
cat > ~/docker_key.json <<'endmsg'
{
.
<some secret data>
.
}
endmsg
docker login -u _json_key -p "$(cat ~/docker_key.json)"
https://gcr.io gcloud docker -a
docker push
gcr.io/lol-prod/gceme:canaryHowever, it fails with a "docker: not found" error:
Started by upstream project "gceme-code-fetch-build" build number 13
originally caused by:
Started by user jenkins
Building on master in workspace /var/jenkins_home/gcme
[gcme] $ /bin/sh -xe /tmp/hudson147937620201668461.sh
+ cat
+ cat ~/docker_key.json
+ docker login -u _json_key -p https://gcr.io
/tmp/hudson147937620201668461.sh: 16: /tmp/hudson147937620201668461.sh: docker: not found
Build step 'Execute shell' marked build as failure
Warning: you have no plugins providing access control for builds, so falling back to legacy behavior of permitting any downstream builds to be triggered
Finished: FAILURE
NOTES:
1) Jenkins master is running as a docker image in Kubernetes
2) It uses a jenkins slave server which is an ec2 instance