mirror of https://gerrit.osmocom.org/osmo-ci
obs: check_builders: at least 10, fail on error
The number of builders connected to the OBS server seems to fluctuate a bit (used to be 14, then 17 now 16). Make sure that we have at least 10 builders connected. Fix that the test didn't exit with 1 on error. Related: https://obs.osmocom.org/monitor Change-Id: Iedd506601a5450550e21bf701309b4ea79a3d897
This commit is contained in:
parent
c70aba5906
commit
288fa2d51e
|
@ -1,11 +1,19 @@
|
|||
#!/bin/sh -ex
|
||||
count=14
|
||||
min=10
|
||||
max=500
|
||||
wget -q https://obs.osmocom.org -O index.html
|
||||
|
||||
if ! grep -q " of $count build hosts" index.html; then
|
||||
grep "build hosts" index.html
|
||||
set +x
|
||||
echo
|
||||
echo "ERROR: expected $count builders to be connected to OBS!"
|
||||
echo
|
||||
fi
|
||||
set +x
|
||||
for i in $(seq $min $max); do
|
||||
if grep -q " of $i build hosts" index.html; then
|
||||
echo
|
||||
echo "Check successful, $i builders are connected to OBS"
|
||||
echo
|
||||
exit 0
|
||||
fi
|
||||
done
|
||||
|
||||
echo
|
||||
echo "ERROR: expected at least $min builders to be connected to OBS!"
|
||||
echo
|
||||
exit 1
|
||||
|
|
Loading…
Reference in New Issue