Skip to content

Commit

Permalink
fix: handle the case where the provisioning phase of the parent fails
Browse files Browse the repository at this point in the history
  • Loading branch information
boukeas committed Dec 20, 2024
1 parent 509da6d commit 17cf021
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/actions/poll-multi/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,12 @@ runs:
done
echo "::endgroup::"
echo "::group::Retrieve IDs of children jobs"
JOB_IDS=$(testflinger results $JOB_ID | jq -r '.provision_output' | sed -n 's/^.*Created job \(.*\)$/\1/p')
RESULTS=$(testflinger results $JOB_ID)
if ! jq -e '.provision_status == 0' <<< "$RESULTS" >/dev/null; then
echo "::error::The provision phase of the parent job $JOB_ID failed"
exit 1
fi
JOB_IDS=$(jq -r '.provision_output' <<< "$RESULTS" | sed -n 's/^.*Created job \(.*\)$/\1/p')
echo "::notice::" $JOB_IDS
echo "::endgroup::"
echo "::group::Retrieve IPs of reserved devices"
Expand Down

0 comments on commit 17cf021

Please sign in to comment.