Skip to content

Commit

Permalink
fix: strip .git suffix from repo url in check-data-keys
Browse files Browse the repository at this point in the history
Signed-off-by: Johnny Bieren <[email protected]>
  • Loading branch information
johnbieren committed Dec 19, 2024
1 parent 1a5b02e commit 6ac1f2a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
3 changes: 3 additions & 0 deletions tasks/check-data-keys/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ Currently, `releaseNotes`, and `cdn` are the only supported systems.
| systems | The systems to check that all data keys are present for | Yes | [] |
| schema | The URl to the schema | Yes | https://raw.githubusercontent.com/konflux-ci/release-service-catalog/refs/heads/development/schema/dataKeys.json |

## Changes in 1.0.2
* Strip the `.git` suffix from the `schema` value if present. Some `taskGitUrl`s add this suffix which results in invalid schema files being passed

## Changes in 1.0.1
* Add `-L` option to curl command to follow redirects for schema download.
* Fixes README.md `schema` parameter description.
Expand Down
10 changes: 7 additions & 3 deletions tasks/check-data-keys/check-data-keys.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ kind: Task
metadata:
name: check-data-keys
labels:
app.kubernetes.io/version: "1.0.1"
app.kubernetes.io/version: "1.0.2"
annotations:
tekton.dev/pipelines.minVersion: "0.12.1"
tekton.dev/tags: release
Expand All @@ -31,6 +31,9 @@ spec:
- name: check-data-keys
image: quay.io/konflux-ci/release-service-utils:9089cafbf36bb889b4b73d8c2965613810f13736
args: ["$(params.systems[*])"]
env:
- name: "SCHEMA_FILE"
value: "$(params.schema)"
script: |
#!/usr/bin/env bash
set -ex
Expand All @@ -40,8 +43,9 @@ spec:
exit 1
fi
if ! curl -sL --fail-with-body "$(params.schema)" -o /tmp/schema ; then
echo "Failed to download schema file: $(params.schema)"
schema="${SCHEMA_FILE/\.git/}"
if ! curl -sL --fail-with-body "$schema" -o /tmp/schema ; then
echo "Failed to download schema file: $schema"
exit 1
fi
Expand Down

0 comments on commit 6ac1f2a

Please sign in to comment.