From 6a506ebdaa54c167328389ea3a2f9a74be9b6dc2 Mon Sep 17 00:00:00 2001 From: Tejal Desai Date: Thu, 28 Jan 2021 15:34:28 -0800 Subject: [PATCH] fix cloudbuild release --- deploy/Dockerfile | 4 ++-- deploy/Dockerfile_debug | 4 ++-- deploy/Dockerfile_slim | 2 +- deploy/Dockerfile_warmer | 4 ++-- deploy/cloudbuild-executor.yaml | 8 ++++---- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/deploy/Dockerfile b/deploy/Dockerfile index bde869405..84ff523ce 100644 --- a/deploy/Dockerfile +++ b/deploy/Dockerfile @@ -14,7 +14,7 @@ # Builds the static Go image to execute in a Kubernetes job -FROM golang:1.14 +FROM golang:1.15 ARG GOARCH=amd64 WORKDIR /go/src/github.com/GoogleContainerTools/kaniko RUN echo $GOARCH > /goarch @@ -27,7 +27,7 @@ RUN [ ! "x" = "x$TARGETPLATFORM" ] && `echo $TARGETPLATFORM | awk '{split($0,a, RUN echo "I am runninng $TARGETPLATFORM with with $(cat /goarch)" # Get GCR credential helper -RUN GOARCH=$(cat /goarch) && CGO_ENABLED=0 && \ +RUN GOARCH=$(cat /goarch) && \ (mkdir -p /go/src/github.com/GoogleCloudPlatform || true) && \ cd /go/src/github.com/GoogleCloudPlatform && \ git clone https://github.com/GoogleCloudPlatform/docker-credential-gcr.git && \ diff --git a/deploy/Dockerfile_debug b/deploy/Dockerfile_debug index 132a01a2b..2c4edcf23 100644 --- a/deploy/Dockerfile_debug +++ b/deploy/Dockerfile_debug @@ -15,7 +15,7 @@ # Builds the static Go image to execute in a Kubernetes job # Stage 0: Build the executor binary and get credential helpers -FROM golang:1.14 +FROM golang:1.15 ARG GOARCH=amd64 RUN echo $GOARCH > /goarch @@ -30,7 +30,7 @@ RUN cat /goarch WORKDIR /go/src/github.com/GoogleContainerTools/kaniko # Get GCR credential helper -RUN GOARCH=$(cat /goarch) && CGO_ENABLED=0 && \ +RUN GOARCH=$(cat /goarch) && \ (mkdir -p /go/src/github.com/GoogleCloudPlatform || true) && \ cd /go/src/github.com/GoogleCloudPlatform && \ git clone https://github.com/GoogleCloudPlatform/docker-credential-gcr.git && \ diff --git a/deploy/Dockerfile_slim b/deploy/Dockerfile_slim index 919578c0a..cdd1ad00e 100644 --- a/deploy/Dockerfile_slim +++ b/deploy/Dockerfile_slim @@ -13,7 +13,7 @@ # limitations under the License. # Builds the static Go image to execute in a Kubernetes job -FROM golang:1.14 as build_env +FROM golang:1.15 as build_env ARG GOARCH=amd64 RUN echo $GOARCH > /goarch diff --git a/deploy/Dockerfile_warmer b/deploy/Dockerfile_warmer index 9e349f83b..fd5289c8b 100644 --- a/deploy/Dockerfile_warmer +++ b/deploy/Dockerfile_warmer @@ -14,7 +14,7 @@ # Builds the static Go image to execute in a Kubernetes job -FROM golang:1.14 +FROM golang:1.15 ARG GOARCH=amd64 WORKDIR /go/src/github.com/GoogleContainerTools/kaniko RUN echo $GOARCH > /goarch @@ -27,7 +27,7 @@ RUN [ ! "x" = "x$TARGETPLATFORM" ] && `echo $TARGETPLATFORM | awk '{split($0,a, RUN echo "I am runninng $TARGETPLATFORM with $(cat /goarch)" # Get GCR credential helper -RUN GOARCH=$(cat /goarch) && CGO_ENABLED=0 && \ +RUN GOARCH=$(cat /goarch) && \ (mkdir -p /go/src/github.com/GoogleCloudPlatform || true) && \ cd /go/src/github.com/GoogleCloudPlatform && \ git clone https://github.com/GoogleCloudPlatform/docker-credential-gcr.git && \ diff --git a/deploy/cloudbuild-executor.yaml b/deploy/cloudbuild-executor.yaml index 5d83f18ee..cd5af0c71 100644 --- a/deploy/cloudbuild-executor.yaml +++ b/deploy/cloudbuild-executor.yaml @@ -9,10 +9,10 @@ steps: args: ['buildx', 'create', '--use', '--platform', '${_DOCKER_BUILDX_PLATFORMS}'] id: 'create-builder' -# # First, build kaniko -# - name: "gcr.io/cloud-builders/docker" -# args: ['buildx', 'build', '--platform', '$_DOCKER_BUILDX_PLATFORMS', "-f", "deploy/Dockerfile", -# "-t", "gcr.io/$PROJECT_ID/${_EXECUTOR_IMAGE_NAME}:$COMMIT_SHA", "--push", "." ] + # First, build kaniko + - name: "gcr.io/cloud-builders/docker" + args: ['buildx', 'build', '--platform', '$_DOCKER_BUILDX_PLATFORMS', "-f", "deploy/Dockerfile", + "-t", "gcr.io/$PROJECT_ID/${_EXECUTOR_IMAGE_NAME}:$COMMIT_SHA", "--push", "." ] # Finally executor:slim image - name: "gcr.io/cloud-builders/docker"