os-autoinst-distri-rocky/scripts/cancel-build.sh

14 lines
313 B
Bash
Raw Permalink Normal View History

2022-10-15 03:50:16 +00:00
#!/bin/bash
BUILD="$1"
2022-10-15 04:09:45 +00:00
## Usage: Cancels all outstanding openQA jobs for the specified build
# scripts/cancel-build.sh 20221014.133700-My-Named-Build
2022-10-15 03:50:16 +00:00
jobs_in_build=$(openqa-cli api jobs build="$BUILD" | jq -r '.jobs[].id' | xargs)
for id in $jobs_in_build
do
openqa-cli api -X POST "jobs/$id/cancel"
done