Skip to content
Snippets Groups Projects
Commit b0a70194 authored by Stevan Radaković's avatar Stevan Radaković
Browse files

test-generic.yaml: lava-report job now uses new build URL scheme


We switched the build id scheme in SQUAD to use pipeline ID instead
of short commit SHA. Now lava-report job has to reflect that as well.

Signed-off-by: default avatarStevan Radaković <stevan.radakovic@linaro.org>
parent 053b1d44
No related branches found
No related tags found
1 merge request!138test-generic.yaml: lava-report job now uses new build URL scheme
...@@ -102,13 +102,10 @@ ...@@ -102,13 +102,10 @@
CI_LAVA_INSTANCE: "https://lava.ostc-eu.org/" CI_LAVA_INSTANCE: "https://lava.ostc-eu.org/"
script: script:
- | - |
# Get the build id based on commit sha
build_id="$(curl --silent "https://squadp.svc.ostc-eu.dev/api/builds/?version=$CI_COMMIT_SHORT_SHA" | jq -r '.results[0].id')"
# Get the test_runs_incomplete value from build status. That will tell # Get the test_runs_incomplete value from build status. That will tell
# us if any of the LAVA jobs failed and we can determine whether the # us if any of the LAVA jobs failed and we can determine whether the
# report job is successful or not. # report job is successful or not.
incomplete="$(curl --silent https://squadp.svc.ostc-eu.dev/api/builds/$build_id/status/ | jq -r '.test_runs_incomplete')" incomplete="$(curl --silent $CI_SQUAD_INSTANCE/api/builds/$CI_PIPELINE_ID/status/ | jq -r '.test_runs_incomplete')"
if [ "$incomplete" != "0" ]; then if [ "$incomplete" != "0" ]; then
echo "ERROR: Incomplete test job reported: exit code 1" echo "ERROR: Incomplete test job reported: exit code 1"
exit 1 exit 1
...@@ -138,7 +135,7 @@ ...@@ -138,7 +135,7 @@
script: script:
- | - |
set -x set -x
pass_percentage="$(curl --silent https://squadp.svc.ostc-eu.dev/api/builds/$build_id/status/ | jq -r '.pass_percentage')" pass_percentage="$(curl --silent $CI_SQUAD_INSTANCE/api/builds/$CI_PIPELINE_ID/status/ | jq -r '.pass_percentage')"
success_rate=`printf "%.2f" $pass_percentage` success_rate=`printf "%.2f" $pass_percentage`
anybadge --label=lava-test --value=${success_rate} --suffix='%' --file=lava-test.svg 50=red 60=orange 80=yellow 100=green anybadge --label=lava-test --value=${success_rate} --suffix='%' --file=lava-test.svg 50=red 60=orange 80=yellow 100=green
set +x set +x
......
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