Skip to content

Commit a4b8790

Browse files
committed
rookie mistake here, there, everywhere
1 parent 31a5e1c commit a4b8790

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

.buildkite/scripts/check_queue.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ cancel_build_url="https://api.buildkite.com/v2/organizations/elastic/pipelines/$
77
# Don't look at the last build (it's okay if it's still running!)
88
# Look three builds back instead (if this build is still running,
99
# it means there's already one in the queue and we can safely cancel this one)
10-
THIRD_TO_LAST_BUILD_STATE=$(curl -s -H "Authorization: Bearer ${BUILDKITE_API_TOKEN}" $build_data_url | jq -r '.[2].status')
11-
12-
echo $(curl -s -H "Authorization: Bearer ${BUILDKITE_API_TOKEN}" $build_data_url)
10+
THIRD_TO_LAST_BUILD_STATE=$(curl -s -H "Authorization: Bearer ${BUILDKITE_API_TOKEN}" $build_data_url | jq -r '.[2].state')
1311

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

0 commit comments

Comments
 (0)