-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun-docker-build.sh
executable file
·58 lines (46 loc) · 1.46 KB
/
run-docker-build.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/usr/bin/env sh
# Author: Sven Vogel
# Created: 17.05.2024
# Description: Builds the Dockerfile for SDK and DEVKIT
echo "+--------------------------------------+"
echo "| CHECKING prelude |"
echo "+--------------------------------------+"
if [ -z "$SDK" ]; then
echo "no SDK specified, sourcing .env"
source ./.env
if [ -z "$SDK" ]; then
echo "no SDK specified"
exit 1
else
echo "using SDK $SDK"
fi
else
echo "using SDK $SDK"
fi
echo "+--------------------------------------+"
echo "| BUILDING SDK |"
echo "+--------------------------------------+"
docker build --tag servostar/gemstone:sdk-"$SDK" sdk/.
if [ ! $? -eq 0 ]; then
echo "===> failed to build sdk"
exit 1
fi
echo "+--------------------------------------+"
echo "| BUILDING DEVKIT |"
echo "+--------------------------------------+"
docker build --tag servostar/gemstone:devkit-"$SDK" .
if [ ! $? -eq 0 ]; then
echo "===> failed to build devkit"
exit 1
fi
echo "+--------------------------------------+"
echo "| RUNNING check test |"
echo "+--------------------------------------+"
docker run --rm --name "devkit-$SDK-check-test"- servostar/gemstone:devkit-"$SDK" sh run-check-test.sh
if [ ! $? -eq 0 ]; then
echo "===> failed to run build or checks"
exit 1
fi
echo "+--------------------------------------+"
echo "| DONE |"
echo "+--------------------------------------+"