Skip to content

Commit

Permalink
rookie mistake here, there, everywhere
Browse files Browse the repository at this point in the history
  • Loading branch information
bmorelli25 committed Feb 9, 2024
1 parent 31a5e1c commit a4b8790
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions .buildkite/scripts/check_queue.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ cancel_build_url="https://api.buildkite.com/v2/organizations/elastic/pipelines/$
# Don't look at the last build (it's okay if it's still running!)
# Look three builds back instead (if this build is still running,
# it means there's already one in the queue and we can safely cancel this one)
THIRD_TO_LAST_BUILD_STATE=$(curl -s -H "Authorization: Bearer ${BUILDKITE_API_TOKEN}" $build_data_url | jq -r '.[2].status')

echo $(curl -s -H "Authorization: Bearer ${BUILDKITE_API_TOKEN}" $build_data_url)
THIRD_TO_LAST_BUILD_STATE=$(curl -s -H "Authorization: Bearer ${BUILDKITE_API_TOKEN}" $build_data_url | jq -r '.[2].state')

echo "Determining if there are multiple builds waiting."
if [[ "$THIRD_TO_LAST_BUILD_STATE" == "running" ]]; then
Expand Down

0 comments on commit a4b8790

Please sign in to comment.