-
-
Notifications
You must be signed in to change notification settings - Fork 48
/
smokeTest.sh
executable file
·31 lines (29 loc) · 899 Bytes
/
smokeTest.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash
if [ $# -eq 0 ]; then
project=minsky
else
project=$1
fi
rm *.log
for i in Dockerfile-*[^~]; do
case $i in
Dockerfile-debian) versions="10 11";;
Dockerfile-ubuntu) versions="18.04 20.04 22.04 23.04";;
Dockerfile-fedora) versions="36 37 38";;
Dockerfile-leap) versions="15.4 15.5";;
*) versions=default;;
esac
for version in $versions; do
if docker build --label obsSmokeTest --network=host --build-arg project=$project --build-arg version=$version --pull --no-cache -f $i .; then
echo "$i-$version PASSED" >$i-$version.log
else
echo "$i-$version FAILED" >$i-$version.log
fi &
done
done
wait
docker container prune -f --filter label=obsSmokeTest
cat *.log
# check if any child process failed, and emit an appropriate status code
grep FAILED *.log &>/dev/null
exit $[!$?]