Skip to content

Commit 4257d47

Browse files
authored
ci: wait until number of test jobs stablize (#94)
1 parent 2a24a5f commit 4257d47

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

run-its.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
set -euo pipefail
44

5+
countTestJobs() {
6+
kubectl get job.batch -o name -l project=container-debug-support,type=integration-test \
7+
| wc -l
8+
}
9+
510
echo ">> Building test images [$(date)]"
611
skaffold build -p integration
712

@@ -12,8 +17,9 @@ skaffoldPid=$!
1217
trap "echo '>> Tearing down test jobs [$(date)]'; kill $skaffoldPid; skaffold delete -p integration" 0 1 3 15
1318

1419
echo ">> Waiting for test jobs to start [$(date)]"
15-
# 5 tests = go 1.13 1.14 1.15 1.16 + nodejs 12
16-
while [ $(kubectl get job.batch -o name | wc -l) -lt 5 ]; do
20+
jobcount=0
21+
while [ $jobcount -eq 0 -o $jobcount -ne $(countTestJobs) ]; do
22+
jobcount=$(countTestJobs)
1723
sleep 5
1824
done
1925
echo ">> Monitoring for test job completion [$(date)]"

0 commit comments

Comments
 (0)