Skip to content

Commit

Permalink
fix(KFLUXBUGS-1846): incomplete image results in push-snapshot
Browse files Browse the repository at this point in the history
- Bump utils image for improved get-image-architectures:
  - konflux-ci/release-service-utils#328
- Fix authentication for skopeo inspect
  when running get-image-architectures
  - From second component on, it would always use the docker config that
    was crafted for the previous component, so if the source repo was
    private, it would fail to fetch the architecture details for that
    image. As a result, image results would be wrong.

Signed-off-by: Martin Malina <[email protected]>
  • Loading branch information
mmalina committed Nov 27, 2024
1 parent fe8d948 commit 2865054
Show file tree
Hide file tree
Showing 11 changed files with 26 additions and 18 deletions.
5 changes: 5 additions & 0 deletions tasks/push-snapshot/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ Tekton task to push snapshot images to an image registry using `cosign copy`.
| caTrustConfigMapName | The name of the ConfigMap to read CA bundle data from | Yes | trusted-ca |
| caTrustConfigMapKey | The name of the key in the ConfigMap that contains the CA bundle data | Yes | ca-bundle.crt |

## Changes in 6.4.1
* Bump release-service-utils image
* The updated image will fail if skopeo inspect fails
* Fix authentication for skopeo inspect when running get-image-architectures

## Changes in 6.4.0
* Bump release-service-utils to upgrade the get-image-architecture script which can properly handle a Tekton bundle

Expand Down
7 changes: 5 additions & 2 deletions tasks/push-snapshot/push-snapshot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ kind: Task
metadata:
name: push-snapshot
labels:
app.kubernetes.io/version: "6.4.0"
app.kubernetes.io/version: "6.4.1"
annotations:
tekton.dev/pipelines.minVersion: "0.12.1"
tekton.dev/tags: release
Expand Down Expand Up @@ -38,7 +38,7 @@ spec:
description: The workspace where the snapshot spec and data json files reside
steps:
- name: push-snapshot
image: quay.io/konflux-ci/release-service-utils:5e9ee4c1d6cb3484d227c31557be3f476a4f3d7f
image: quay.io/konflux-ci/release-service-utils:76021ef1e9f0f14397260ee24c9a43e37d3f83ac
script: |
#!/usr/bin/env bash
set -eux
Expand Down Expand Up @@ -73,6 +73,9 @@ spec:
echo "Max retries exceeded."
exit 1
fi
# Only the cosign call above needs this custom Docker config. Unset it, so that skopeo call
# in get-image-architecture uses the default config in ~/.docker/config.json (this one would break it)
unset DOCKER_CONFIG
else
printf '* Component push skipped (source digest exists at destination): %s (%s)\n' \
"$2" "$3"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ spec:
- name: data
steps:
- name: setup-values
image: quay.io/konflux-ci/release-service-utils:5e9ee4c1d6cb3484d227c31557be3f476a4f3d7f
image: quay.io/konflux-ci/release-service-utils:76021ef1e9f0f14397260ee24c9a43e37d3f83ac
script: |
#!/usr/bin/env sh
set -eux
Expand Down Expand Up @@ -66,7 +66,7 @@ spec:
- name: data
steps:
- name: check-result
image: quay.io/konflux-ci/release-service-utils:5e9ee4c1d6cb3484d227c31557be3f476a4f3d7f
image: quay.io/konflux-ci/release-service-utils:76021ef1e9f0f14397260ee24c9a43e37d3f83ac
script: |
#!/usr/bin/env sh
set -eux
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ spec:
- name: data
steps:
- name: setup-values
image: quay.io/konflux-ci/release-service-utils:5e9ee4c1d6cb3484d227c31557be3f476a4f3d7f
image: quay.io/konflux-ci/release-service-utils:76021ef1e9f0f14397260ee24c9a43e37d3f83ac
script: |
#!/usr/bin/env sh
set -eux
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ spec:
- name: data
steps:
- name: setup-values
image: quay.io/konflux-ci/release-service-utils:5e9ee4c1d6cb3484d227c31557be3f476a4f3d7f
image: quay.io/konflux-ci/release-service-utils:76021ef1e9f0f14397260ee24c9a43e37d3f83ac
script: |
#!/usr/bin/env sh
set -eux
Expand Down
4 changes: 2 additions & 2 deletions tasks/push-snapshot/tests/test-push-snapshot-mount-certs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ spec:
- name: data
steps:
- name: setup-values
image: quay.io/konflux-ci/release-service-utils:5e9ee4c1d6cb3484d227c31557be3f476a4f3d7f
image: quay.io/konflux-ci/release-service-utils:76021ef1e9f0f14397260ee24c9a43e37d3f83ac
script: |
#!/usr/bin/env sh
set -eux
Expand Down Expand Up @@ -89,7 +89,7 @@ spec:
- name: data
steps:
- name: check-result
image: quay.io/konflux-ci/release-service-utils:5e9ee4c1d6cb3484d227c31557be3f476a4f3d7f
image: quay.io/konflux-ci/release-service-utils:76021ef1e9f0f14397260ee24c9a43e37d3f83ac
script: |
#!/usr/bin/env sh
set -eux
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ spec:
- name: data
steps:
- name: setup-values
image: quay.io/konflux-ci/release-service-utils:5e9ee4c1d6cb3484d227c31557be3f476a4f3d7f
image: quay.io/konflux-ci/release-service-utils:76021ef1e9f0f14397260ee24c9a43e37d3f83ac
script: |
#!/usr/bin/env sh
set -eux
Expand Down Expand Up @@ -79,7 +79,7 @@ spec:
- name: data
steps:
- name: check-result
image: quay.io/konflux-ci/release-service-utils:5e9ee4c1d6cb3484d227c31557be3f476a4f3d7f
image: quay.io/konflux-ci/release-service-utils:76021ef1e9f0f14397260ee24c9a43e37d3f83ac
script: |
#!/usr/bin/env sh
set -eux
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ spec:
- name: data
steps:
- name: setup-values
image: quay.io/konflux-ci/release-service-utils:5e9ee4c1d6cb3484d227c31557be3f476a4f3d7f
image: quay.io/konflux-ci/release-service-utils:76021ef1e9f0f14397260ee24c9a43e37d3f83ac
script: |
#!/usr/bin/env sh
set -eux
Expand Down Expand Up @@ -81,7 +81,7 @@ spec:
- name: data
steps:
- name: check-result
image: quay.io/konflux-ci/release-service-utils:5e9ee4c1d6cb3484d227c31557be3f476a4f3d7f
image: quay.io/konflux-ci/release-service-utils:76021ef1e9f0f14397260ee24c9a43e37d3f83ac
script: |
#!/usr/bin/env sh
set -eux
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ spec:
- name: data
steps:
- name: setup-values
image: quay.io/konflux-ci/release-service-utils:5e9ee4c1d6cb3484d227c31557be3f476a4f3d7f
image: quay.io/konflux-ci/release-service-utils:76021ef1e9f0f14397260ee24c9a43e37d3f83ac
script: |
#!/usr/bin/env sh
set -eux
Expand Down Expand Up @@ -76,7 +76,7 @@ spec:
- name: data
steps:
- name: check-result
image: quay.io/konflux-ci/release-service-utils:5e9ee4c1d6cb3484d227c31557be3f476a4f3d7f
image: quay.io/konflux-ci/release-service-utils:76021ef1e9f0f14397260ee24c9a43e37d3f83ac
script: |
#!/usr/bin/env sh
set -eux
Expand Down
4 changes: 2 additions & 2 deletions tasks/push-snapshot/tests/test-push-snapshot-retries.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ spec:
- name: data
steps:
- name: setup-values
image: quay.io/konflux-ci/release-service-utils:5e9ee4c1d6cb3484d227c31557be3f476a4f3d7f
image: quay.io/konflux-ci/release-service-utils:76021ef1e9f0f14397260ee24c9a43e37d3f83ac
script: |
#!/usr/bin/env sh
set -eux
Expand Down Expand Up @@ -67,7 +67,7 @@ spec:
- name: data
steps:
- name: check-result
image: quay.io/konflux-ci/release-service-utils:5e9ee4c1d6cb3484d227c31557be3f476a4f3d7f
image: quay.io/konflux-ci/release-service-utils:76021ef1e9f0f14397260ee24c9a43e37d3f83ac
script: |
#!/usr/bin/env sh
set -eux
Expand Down
4 changes: 2 additions & 2 deletions tasks/push-snapshot/tests/test-push-snapshot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ spec:
- name: data
steps:
- name: setup-values
image: quay.io/konflux-ci/release-service-utils:5e9ee4c1d6cb3484d227c31557be3f476a4f3d7f
image: quay.io/konflux-ci/release-service-utils:76021ef1e9f0f14397260ee24c9a43e37d3f83ac
script: |
#!/usr/bin/env sh
set -eux
Expand Down Expand Up @@ -85,7 +85,7 @@ spec:
- name: data
steps:
- name: check-result
image: quay.io/konflux-ci/release-service-utils:5e9ee4c1d6cb3484d227c31557be3f476a4f3d7f
image: quay.io/konflux-ci/release-service-utils:76021ef1e9f0f14397260ee24c9a43e37d3f83ac
script: |
#!/usr/bin/env sh
set -eux
Expand Down

0 comments on commit 2865054

Please sign in to comment.