From a224f615a8d4e159d83af841b2b4990eedd2f365 Mon Sep 17 00:00:00 2001 From: Tom Solberg Date: Wed, 1 Feb 2023 09:17:26 +0100 Subject: [PATCH] Do not mount buildkite-agent when building CI image (#57) --- .buildkite/pipeline.yaml | 21 ++++++++++++++++++--- hooks/command | 1 + 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/.buildkite/pipeline.yaml b/.buildkite/pipeline.yaml index c83619f..23a04d0 100644 --- a/.buildkite/pipeline.yaml +++ b/.buildkite/pipeline.yaml @@ -20,14 +20,29 @@ steps: plugins: - EmbarkStudios/k8s#1.2.6: image: gcr.io/kaniko-project/executor:latest + mount-buildkite-agent: false default-secret-name: buildkite-k8s-plugin use-agent-node-affinity: true command: - --destination=embarkstudios/k8s-buildkite-agent - --context=. - --reproducible - - --cache=true - - --cache-repo=kaniko-cache.buildkite.svc.cluster.local/kaniko/cache - - --cache-dir=$BUILDKITE_BUILD_PATH/_kaniko_cache + mount-secret: + - docker-hub-credentials:/kaniko/.docker + - name: Build and publish k8s-buildkite-agent CI-debug container image + branches: '!master' + agents: + queue: monorepo-ci + os: linux + plugins: + - EmbarkStudios/k8s#1.2.6: + image: gcr.io/kaniko-project/executor:latest + mount-buildkite-agent: false + default-secret-name: buildkite-k8s-plugin + use-agent-node-affinity: true + command: + - --destination=embarkstudios/k8s-buildkite-agent:ci-debug + - --context=. + - --reproducible mount-secret: - docker-hub-credentials:/kaniko/.docker diff --git a/hooks/command b/hooks/command index 4c87996..ee1284a 100755 --- a/hooks/command +++ b/hooks/command @@ -39,6 +39,7 @@ readonly bootstrap_container_log_complete_marker_file step_container_log_complete_marker_file="$(mktemp)" readonly step_container_log_complete_marker_file +# shellcheck disable=2317 # Shellcheck doesn't understand traps function cleanup { rm -f "$bootstrap_container_log_complete_marker_file" "$step_container_log_complete_marker_file"