diff --git a/tekton/publish.yaml b/tekton/publish.yaml index 708a11d15e1..d542b7e19e6 100644 --- a/tekton/publish.yaml +++ b/tekton/publish.yaml @@ -188,12 +188,10 @@ spec: sed -i -e 's/\(pipeline.tekton.dev\/release\): "devel"/\1: "$(params.versionTag)"/g' -e 's/\(app.kubernetes.io\/version\): "devel"/\1: "$(params.versionTag)"/g' -e 's/\(version\): "devel"/\1: "$(params.versionTag)"/g' ${OUTPUT_RELEASE_DIR}/release.yaml sed -i -e 's/\(pipeline.tekton.dev\/release\): "devel"/\1: "$(params.versionTag)"/g' -e 's/\(app.kubernetes.io\/version\): "devel"/\1: "$(params.versionTag)"/g' -e 's/\(version\): "devel"/\1: "$(params.versionTag)"/g' ${OUTPUT_RELEASE_DIR}/release.notags.yaml - name: koparse - image: gcr.io/tekton-releases/dogfooding/koparse@sha256:5e8a522fc1e587fc00b69a6d73e0bfdf7a29ca143537a5542eb224680d2dbf2f + image: gcr.io/tekton-releases/dogfooding/koparse@sha256:4d58eea7a59eb2b07ad3f45ad473add3ee3f8597f7a61de19347a35a186dac36 script: | set -ex - IMAGES_PATH=${CONTAINER_REGISTRY} - # Find "--preserve-import-paths" in a list of args function find_preserve_import_path() { for arg in $@; do @@ -207,18 +205,21 @@ spec: # If "--preserve-import-paths" is used, include "package" in the expected path find_preserve_import_path \ $(echo $KO_EXTRA_ARGS) && \ - IMAGES_PATH=${IMAGES_PATH}/$(params.package) || true + PRESERVE_IMPORT_PATH="--preserve-path" || \ + PRESERVE_IMPORT_PATH="--no-preserve-path" for cmd in $(params.images) do - IMAGES="${IMAGES} ${IMAGES_PATH}/cmd/${cmd}:$(params.versionTag)" + IMAGES="${IMAGES} $(params.package)/cmd/${cmd}:$(params.versionTag)" done # Parse the built images from the release.yaml generated by ko koparse \ --path $OUTPUT_RELEASE_DIR/release.yaml \ - --base ${IMAGES_PATH} --images ${IMAGES} > /workspace/built_images - + --base $(params.package) \ + --container-registry ${CONTAINER_REGISTRY} \ + --images ${IMAGES} \ + ${PRESERVE_IMPORT_PATH} > /workspace/built_images - name: tag-images image: cgr.dev/chainguard/crane:latest-dev@sha256:8ebcdd154abd06371886fee6583c7c9bbc4e88a2999c493266b1580f605e0e7c