ci: override the GIT_URL & GIT_REF from SNAPSHOT

Signed-off-by: Wei Shi <wshi@redhat.com>
This commit is contained in:
Wei Shi 2024-02-20 17:22:07 +08:00
parent c5132afb01
commit fafbff3977
1 changed files with 5 additions and 0 deletions

View File

@ -54,6 +54,11 @@ spec:
export TESTING_FARM_API_TOKEN=$(cat /etc/secrets/testing-farm-token) export TESTING_FARM_API_TOKEN=$(cat /etc/secrets/testing-farm-token)
apk add jq
GIT_URL=$(echo "${SNAPSHOT}" | jq -r '.components[0].source.git.url')
GIT_REF=$(echo "${SNAPSHOT}" | jq -r '.components[0].source.git.revision')
testing-farm request \ testing-farm request \
--environment SNAPSHOT="$(echo ${SNAPSHOT} | base64 -w 0)" \ --environment SNAPSHOT="$(echo ${SNAPSHOT} | base64 -w 0)" \
--git-url "${GIT_URL}" \ --git-url "${GIT_URL}" \