From e46200e4fbb84b1bdfdd97bc9986879507d18782 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Gautier?= Date: Fri, 16 Feb 2018 15:50:14 +0100 Subject: [PATCH] Revert "CLOUD-483: Use google container builder to build docker image (#117)" This reverts commit f121a831365322f7a7c339d90778c30340722199. --- .ci/Jenkinsfile | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/.ci/Jenkinsfile b/.ci/Jenkinsfile index 1409cc18..2438cf8c 100644 --- a/.ci/Jenkinsfile +++ b/.ci/Jenkinsfile @@ -441,9 +441,10 @@ def withBuildNode(String phpVersion, body) { podTemplate(name: "php-api-client-node", label: "build-" + uuid, containers: [ containerTemplate( name: "docker", - image: "paulwoelfel/docker-gcloud:v1.13", + image: "paulwoelfel/docker-gcloud", ttyEnabled: true, command: 'cat', + envVars: [envVar(key: "DOCKER_API_VERSION", value: "1.23")], resourceRequestCpu: '100m', resourceRequestMemory: '200Mi'), containerTemplate( name: "php", @@ -455,6 +456,8 @@ def withBuildNode(String phpVersion, body) { envVar(key: "COMPOSER_AUTH", value: "{\"github-oauth\":{\"github.com\": \"$token\"}}")], resourceRequestCpu: '500m', resourceRequestMemory: '1000Mi') + ], volumes: [ + hostPathVolume(hostPath: "/var/run/docker.sock", mountPath: "/var/run/docker.sock") ]) { node("build-" + uuid) { dir('/home/jenkins') { @@ -480,12 +483,14 @@ def withDockerGcloud(body) { podTemplate(name: "php-api-client-gcloud", label: "dockergcloud-" + uuid, containers: [ containerTemplate( name: "docker", - image: "paulwoelfel/docker-gcloud:v1.13", + image: "paulwoelfel/docker-gcloud", ttyEnabled: true, command: 'cat', resourceRequestCpu: '100m', - resourceRequestMemory: '200Mi' - ) + resourceRequestMemory: '200Mi', + envVars: [envVar(key: "DOCKER_API_VERSION", value: "1.23")]) + ], volumes: [ + hostPathVolume(hostPath: "/var/run/docker.sock", mountPath: "/var/run/docker.sock") ]) { node("dockergcloud-" + uuid) { container("docker") { @@ -596,6 +601,10 @@ def queue(String phpApiImageName, String pimImageName, String pimVersion, String }] }] """) + ], volumes: [ + hostPathVolume(hostPath: "/var/run/docker.sock", mountPath: "/var/run/docker.sock"), + hostPathVolume(hostPath: "/usr/bin/docker", mountPath: "/usr/bin/docker") + ]) { node("pubsub-" + uuid) { def messages = body() @@ -657,7 +666,8 @@ def clearTemplateNames() { def saveDockerData(String gcrName, String gCloudcontainerName = "docker") { container(gCloudcontainerName) { sh "echo 'FROM alpine:3.6\nADD . /data\n' > Dockerfile" - sh "gcloud container builds submit --tag ${gcrName} ." + sh "docker build -t ${gcrName} ." + sh "gcloud docker -- push ${gcrName}" } }