Skip to content

Commit

Permalink
Fix wrong shell in release task
Browse files Browse the repository at this point in the history
And make some files KUBE_DISTRO specific to avoid clash between
publish tasks running in parallel with different KUBE_DISTRO

Signed-off-by: Andrea Frittoli <[email protected]>
  • Loading branch information
afrittoli authored and tekton-robot committed Dec 19, 2024
1 parent 4e0f678 commit a98ed25
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tekton/build-publish-images-manifests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ spec:
- name: container-registy-auth
image: cgr.dev/chainguard/crane:latest-dev@sha256:6fc6fcdeb173c7951f038e6a7b230f586c1be05a011d9e6f9db6c614ec412c2f
script: |
#!/busybox/sh
#!/bin/sh
set -ex
# Login to the container registry
Expand All @@ -91,10 +91,10 @@ spec:
HOSTNAME=${region}.$(params.imageRegistry)
cat ${CONTAINER_REGISTY_CREDENTIALS} | crane auth login -u _json_key --password-stdin ${HOSTNAME}
done
cp ${DOCKER_CONFIG} /workspace/docker-config.json
cp ${DOCKER_CONFIG} /workspace/${KUBE_DISTRO}-docker-config.json
- name: run-kustomize-ko
image: gcr.io/tekton-releases/dogfooding/ko-gcloud:v20240920-6c2a999d36@sha256:1756ca55a09b360028695792e638a7cc366292d7aef44c926a8cb765085664c8
image: ghcr.io/tektoncd/plumbing/ko-gcloud:v20240920-6c2a999d36@sha256:1756ca55a09b360028695792e638a7cc366292d7aef44c926a8cb765085664c8
env:
- name: KO_DOCKER_REPO
value: $(params.imageRegistry)/$(params.imageRegistryPath)
Expand All @@ -109,7 +109,7 @@ spec:
# Setup docker-auth
DOCKER_CONFIG=~/.docker
mkdir -p ${DOCKER_CONFIG}
cp /workspace/docker-config.json ${DOCKER_CONFIG}/config.json
cp /workspace/${KUBE_DISTRO}-docker-config.json ${DOCKER_CONFIG}/config.json
# Change to directory with our .ko.yaml
cd ${PROJECT_ROOT}
Expand Down Expand Up @@ -139,7 +139,7 @@ spec:
# Make a local git tag to make git status happy :)
# The real "tagging" will happen with the "create-release" pipeline.
git tag $(params.versionTag)
git tag $(params.versionTag)-${KUBE_DISTRO}
kustomize build ${PROJECT_ROOT}/config/${KUBE_DISTRO}/overlays/default | \
ko resolve \
Expand All @@ -158,7 +158,7 @@ spec:
-f - > $OUTPUT_RELEASE_DIR/${FILENAME_PREFIX}release.notags.yaml
- name: koparse
image: gcr.io/tekton-releases/dogfooding/koparse@sha256:194c2ab9dce5f778ed757af13c626d6b85f15452e2c2902c79b0d0f5a0adf4d1
image: ghcr.io/tektoncd/plumbing/koparse@sha256:194c2ab9dce5f778ed757af13c626d6b85f15452e2c2902c79b0d0f5a0adf4d1
script: |
set -ex
Expand Down Expand Up @@ -200,7 +200,7 @@ spec:
# Setup docker-auth
DOCKER_CONFIG=~/.docker
mkdir -p ${DOCKER_CONFIG}
cp /workspace/docker-config.json ${DOCKER_CONFIG}/config.json
cp /workspace/${KUBE_DISTRO}-docker-config.json ${DOCKER_CONFIG}/config.json
# Tag the images and put them in all the regions
for IMAGE in $(cat /workspace/built_images)
Expand Down
12 changes: 12 additions & 0 deletions tekton/operator-release-pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,10 @@ spec:
value: $(params.imageRegistry)
- name: imageRegistryPath
value: $(params.imageRegistryPath)
- name: imageRegistryUser
value: $(params.imageRegistryUser)
- name: imageRegistryRegions
value: $(params.imageRegistryRegions)
- name: releaseAsLatest
value: $(params.releaseAsLatest)
- name: platforms
Expand All @@ -217,6 +221,8 @@ spec:
value: kubernetes
- name: releaseFilePrefix
value: ""
- name: koExtraArgs
value: $(params.koExtraArgs)
workspaces:
- name: source
workspace: workarea
Expand Down Expand Up @@ -249,6 +255,10 @@ spec:
value: $(params.imageRegistry)
- name: imageRegistryPath
value: $(params.imageRegistryPath)
- name: imageRegistryUser
value: $(params.imageRegistryUser)
- name: imageRegistryRegions
value: $(params.imageRegistryRegions)
- name: releaseAsLatest
value: $(params.releaseAsLatest)
- name: platforms
Expand All @@ -259,6 +269,8 @@ spec:
value: openshift
- name: releaseFilePrefix
value: "openshift-"
- name: koExtraArgs
value: $(params.koExtraArgs)
workspaces:
- name: source
workspace: workarea
Expand Down

0 comments on commit a98ed25

Please sign in to comment.