From 5edb902c0ae83041c932db574b3dc2639881c8e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=B0=95=EB=8B=A4=ED=98=84=20=28Dahyeon=20Park=29?= Date: Sun, 26 Jul 2026 03:26:37 +0900 Subject: [PATCH] fix(ci): avoid precreated root-owned build directory --- ci/lolympus-tournament-support/tasks.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ci/lolympus-tournament-support/tasks.yaml b/ci/lolympus-tournament-support/tasks.yaml index cbde81d..f94cdc0 100644 --- a/ci/lolympus-tournament-support/tasks.yaml +++ b/ci/lolympus-tournament-support/tasks.yaml @@ -179,8 +179,7 @@ spec: EOF chmod 0600 "$AUTH_HOME/.netrc" export HOME="$AUTH_HOME" - mkdir -p "$SOURCE_DIR" - find "$SOURCE_DIR" -mindepth 1 -maxdepth 1 -exec rm -rf {} + + rm -rf "$SOURCE_DIR" git clone --quiet --no-tags "$REPO_URL" "$SOURCE_DIR" git -C "$SOURCE_DIR" checkout --quiet --detach "$REVISION" ACTUAL_REVISION="$(git -C "$SOURCE_DIR" rev-parse HEAD)" @@ -190,7 +189,7 @@ spec: fi - name: build-and-push image: docker.io/moby/buildkit:v0.31.1-rootless@sha256:946cf909534b789c9b84af75e6d4f8cb23c3b9cb387daec5ba0f4878a3e4647c - workingDir: /workspace/build/source + workingDir: /workspace/build computeResources: requests: {cpu: "1", memory: 2Gi} limits: {cpu: "4", memory: 8Gi} @@ -226,6 +225,7 @@ spec: exit 1 ;; esac + cd /workspace/build/source buildctl-daemonless.sh build \ --frontend dockerfile.v0 \ --local context=. \ @@ -236,7 +236,7 @@ spec: --metadata-file "$(results.image-digest.path)" - name: record-digest image: docker.io/mikefarah/yq:4.47.2@sha256:76def1f56f456ecc1c3173ea275218ee17139bc2018c5a07887b15afd88ec03e - workingDir: /workspace/build/source + workingDir: /workspace/build computeResources: requests: {cpu: 50m, memory: 64Mi} limits: {cpu: 250m, memory: 256Mi}