From b978eda59ce56b51b4d7b16b548c512dcce0679d Mon Sep 17 00:00:00 2001 From: Ralph Bean Date: Wed, 9 Oct 2024 16:00:12 -0400 Subject: [PATCH] Concatenate this list explicitly, for clarity --- task/buildah/0.2/buildah.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/task/buildah/0.2/buildah.yaml b/task/buildah/0.2/buildah.yaml index 10a70a737..8869f9123 100644 --- a/task/buildah/0.2/buildah.yaml +++ b/task/buildah/0.2/buildah.yaml @@ -350,6 +350,9 @@ spec: [ -n "$COMMIT_SHA" ] && DEFAULT_LABELS+=("--label" "vcs-ref=$COMMIT_SHA") [ -n "$IMAGE_EXPIRES_AFTER" ] && DEFAULT_LABELS+=("--label" "quay.expires-after=$IMAGE_EXPIRES_AFTER") + # Concatenate defaults and explicit labels. If a label appears twice, the last one wins. + LABELS=("${DEFAULT_LABELS[@]}" "${LABELS[@]}") + ACTIVATION_KEY_PATH="/activation-key" ENTITLEMENT_PATH="/entitlement" @@ -385,7 +388,6 @@ spec: unshare -Uf $UNSHARE_ARGS --keep-caps -r --map-users 1,1,65536 --map-groups 1,1,65536 -w ${SOURCE_CODE_DIR}/$CONTEXT -- buildah build \ $VOLUME_MOUNTS \ "${BUILDAH_ARGS[@]}" \ - "${DEFAULT_LABELS[@]}" \ "${LABELS[@]}" \ --tls-verify=$TLSVERIFY --no-cache \ --ulimit nofile=4096:4096 \