From 271e54db49f69338a9ee9d835127b9ce1c4e9426 Mon Sep 17 00:00:00 2001 From: Zoran Regvart Date: Fri, 20 Dec 2024 15:37:38 +0100 Subject: [PATCH] `--json` not supported in version of curl in use The version of `curl` (7.76.1) we currently use in quay.io/konflux-ci/appstudio-utils does not support the `--json` parameter, so this reverts to using lengthier `--data-binary` and setting the Content-Type and Accept headers. --- .tekton/scripts/create-task-pipeline-bundle-repos.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.tekton/scripts/create-task-pipeline-bundle-repos.sh b/.tekton/scripts/create-task-pipeline-bundle-repos.sh index 8e7fd590d0..7242a7cd74 100755 --- a/.tekton/scripts/create-task-pipeline-bundle-repos.sh +++ b/.tekton/scripts/create-task-pipeline-bundle-repos.sh @@ -47,7 +47,7 @@ locate_in_all_namespaces() { --arg description "" \ '$ARGS.named' ) - if ! err_msg=$(curl --oauth2-bearer "${QUAY_TOKEN}" "https://quay.io/api/v1/repository" --json "$payload" | jq '.error_message // empty'); + if ! err_msg=$(curl --oauth2-bearer "${QUAY_TOKEN}" "https://quay.io/api/v1/repository" --data-binary "$payload" -H "Content-Type: application/json" -H "Accept: application/json" | jq '.error_message // empty'); then echo "curl returned an error when creating the repository. See the error above." exit 1