File tree Expand file tree Collapse file tree 1 file changed +1
-3
lines changed Expand file tree Collapse file tree 1 file changed +1
-3
lines changed Original file line number Diff line number Diff line change @@ -7,9 +7,7 @@ cancel_build_url="https://api.buildkite.com/v2/organizations/elastic/pipelines/$
7
7
# Don't look at the last build (it's okay if it's still running!)
8
8
# Look three builds back instead (if this build is still running,
9
9
# 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' )
13
11
14
12
echo " Determining if there are multiple builds waiting."
15
13
if [[ " $THIRD_TO_LAST_BUILD_STATE " == " running" ]]; then
You can’t perform that action at this time.
0 commit comments