File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -33,11 +33,12 @@ echo "Build id $BUILD_ID"
33
33
34
34
BUILD_STATUS=" IN_PROGRESS"
35
35
while [ " $BUILD_STATUS " == " IN_PROGRESS" ]; do
36
- echo " Checking build status."
36
+ sleep 10
37
+
37
38
BUILD=$( aws codebuild batch-get-build-batches --ids ${BUILD_ID} )
38
39
BUILD_STATUS=$( echo $BUILD | jq ' .buildBatches[0].buildBatchStatus' -r)
39
40
40
- JOBS=$( echo $BUILD | jq ' .buildBatches[0].buildGroups | [.[] | {identifier: .identifier, status: .currentBuildSummary.buildStatus} | select(.identifier | startswith("JOB")) ]' )
41
+ JOBS=$( echo $BUILD | jq ' .buildBatches[0].buildGroups | [.[] | { identifier: .identifier, status: .currentBuildSummary.buildStatus } ]' )
41
42
TOTAL_JOBS=$( echo $JOBS | jq ' length' )
42
43
43
44
SUCCEEDED_CNT=$( echo $JOBS | jq ' [.[] | select(.status == "SUCCEEDED")] | length' )
@@ -47,9 +48,7 @@ while [ "$BUILD_STATUS" == "IN_PROGRESS" ]; do
47
48
48
49
if [ " $BUILD_STATUS " == " IN_PROGRESS" ]; then
49
50
echo " Build is still in progress (failed=$FAILED_CNT ; in_progress=$IN_PROGRESS_CNT ; succeeded=$SUCCEEDED_CNT ; total=$TOTAL_JOBS ), waiting..."
50
-
51
51
fi
52
- sleep 10
53
52
done
54
53
55
54
if [ " $BUILD_STATUS " != " SUCCEEDED" ]; then
You can’t perform that action at this time.
0 commit comments