Skip to content
Snippets Groups Projects
Commit b30990d1 authored by Chase Qi's avatar Chase Qi Committed by Stevan Radaković
Browse files

.oniro-ci: attach callback url to squad build ID instead of pipeline ID


Pipeline ID is used as squad project level build ID. However, squad
build ID is the one to use for api calls. It is unique cross the
instance.

Signed-off-by: default avatarChase Qi <chase.qi@linaro.org>
parent b0a70194
No related branches found
No related tags found
1 merge request!159.oniro-ci: attach callback url to squad build ID instead of pipeline ID
......@@ -75,7 +75,8 @@
curl $CI_SQUAD_INSTANCE/api/submitjob/oniro-core/$CI_PROJECT_NAME/$CI_PIPELINE_ID/$MACHINE --header "Auth-Token: $CI_SQUAD_TOKEN" --form "backend=oniro_lava" --form "definition=@${job_def}"
done
# Attach a callback to this build to trigger the lava-report job
curl -X POST $CI_SQUAD_INSTANCE/api/build/$CI_PIPELINE_ID/callbacks/ -F "callback_url=$CALLBACK_URL"
squad_build_id="$(curl --silent "$CI_SQUAD_INSTANCE/api/builds/?version=$CI_PIPELINE_ID" | jq -r '.results[0].id')"
curl -X POST $CI_SQUAD_INSTANCE/api/builds/$squad_build_id/callbacks/ --header "Authorization: Token $CI_SQUAD_TOKEN" -F "callback_url=$CALLBACK_URL"
artifacts:
paths:
- lava_jobs/*.yaml
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment