Skip to content

Commit

Permalink
fix(RELEASE-1): task push-snapshot not reading json properly (#399)
Browse files Browse the repository at this point in the history
This commit fixes the read command that sets the arch_json var.

Signed-off-by: Leandro Mendes <[email protected]>
  • Loading branch information
theflockers authored Apr 22, 2024
1 parent 2216aea commit 95ab4a4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions tasks/push-snapshot/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ Tekton task to push snapshot images to an image registry using `cosign copy`.
| dataPath | Path to the JSON string of the merged data to use in the data workspace | Yes | data.json |
| retries | Retry copy N times | Yes | 0 |

## Changes in 4.1.2
* Fixed bug that causes `arch_json` to be empty after setting it
* Update release-service-utils image

## Changes in 4.1.1
* Absorb change in refactored get-image-architectures script

Expand Down
6 changes: 3 additions & 3 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: "4.1.1"
app.kubernetes.io/version: "4.1.2"
annotations:
tekton.dev/pipelines.minVersion: "0.12.1"
tekton.dev/tags: release
Expand Down Expand Up @@ -35,7 +35,7 @@ spec:
description: The workspace where the snapshot spec and data json files reside
steps:
- name: push-snapshot
image: quay.io/redhat-appstudio/release-service-utils:b3059c67d4bdb6c9cf1739fdfb2c0cb595fe0f86
image: quay.io/redhat-appstudio/release-service-utils:6835e64a1811b30c8a48816ab6e2076cc4963759
script: |
#!/usr/bin/env bash
set -eux
Expand Down Expand Up @@ -98,7 +98,7 @@ spec:
repository=$(jq -r '.repository' <<< $component)
# Just read the first from the list of architectures
get-image-architectures "${containerImage}" | read -r arch_json
read -r arch_json <<< $(get-image-architectures "${containerImage}")
arch=$(echo "${arch_json}" | jq -r .platform.architecture)
name=$(jq -r '.name' <<< $component)
Expand Down

0 comments on commit 95ab4a4

Please sign in to comment.