Skip to content

Commit 02e8b2f

Browse files
committed
fix: fix test image job
Assisted-by: Claude
1 parent e5f56b0 commit 02e8b2f

1 file changed

Lines changed: 18 additions & 17 deletions

File tree

integration-tests/Tasks/build-test-image.yaml

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -76,26 +76,30 @@ spec:
7676
fi
7777
7878
- name: build-with-kaniko
79-
image: gcr.io/kaniko-project/executor:v1.23.0
79+
image: gcr.io/kaniko-project/executor:debug
8080
volumeMounts:
8181
- name: quay-auth
82-
mountPath: /kaniko/.docker
82+
mountPath: /secrets/quay
8383
readOnly: true
84-
env:
85-
- name: DOCKER_CONFIG
86-
value: /kaniko/.docker
87-
script: |
88-
#!/busybox/sh
89-
set -eu
84+
command:
85+
- /bin/sh
86+
args:
87+
- -c
88+
- |
89+
BUILD_NEEDED=$(cat /workspace/build-needed)
9090
91-
BUILD_NEEDED=$(cat /workspace/build-needed)
91+
if [ "$BUILD_NEEDED" = "false" ]; then
92+
echo "⏭️ Skipping build (no changes in e2e-tests/)"
93+
echo " Using default image: $(params.default-test-image)"
94+
exit 0
95+
fi
9296
93-
if [ "$BUILD_NEEDED" = "true" ]; then
9497
echo "=== Building test image with Kaniko ==="
9598
96-
# Setup authentication
97-
if [ -f /kaniko/.docker/.dockerconfigjson ]; then
98-
cp /kaniko/.docker/.dockerconfigjson /kaniko/.docker/config.json
99+
# Prepare authentication
100+
mkdir -p /kaniko/.docker
101+
if [ -f /secrets/quay/.dockerconfigjson ]; then
102+
cp /secrets/quay/.dockerconfigjson /kaniko/.docker/config.json
99103
echo "✅ Quay credentials configured"
100104
fi
101105
@@ -108,10 +112,7 @@ spec:
108112
--verbosity=info
109113
110114
echo -n "$(params.test-image-repo):pr-$(params.pull-request-number)" > $(results.test-image.path)
111-
echo "✅ Image built and pushed: $(params.test-image-repo):pr-$(params.pull-request-number)"
112-
else
113-
echo "⏭️ Skipping build, using default image"
114-
fi
115+
echo "✅ Image built and pushed"
115116
116117
- name: show-result
117118
image: alpine:latest

0 commit comments

Comments
 (0)