-
Notifications
You must be signed in to change notification settings - Fork 2
/
package.sh
executable file
·70 lines (56 loc) · 2.56 KB
/
package.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
59
60
61
62
63
64
65
66
67
68
69
70
#!/bin/bash
if [[ $# -eq 0 || $1 == "--help" ]]; then
echo "Usage ./run_build_tests.sh -<option> --[architecture]"
echo " <option>: b - build"
echo " d - deploy"
echo " ud - update deployment image"
echo " mt - manual testing"
echo " e - create environment image"
echo " d - deploy"
echo " t - unittest"
echo " a - all"
echo " "
echo " <architecture>: arm - ARM 32bit"
elif [ "$2" == "--arm" ]; then
if [[ "$1" == "-b" || $1 == "--build" ]]; then
docker build -t radlet_dock.dev:arm -f ./Docker/arm/dev.Dockerfile .
elif [[ "$1" == "-ud" || $1 == "--update-deploy" ]]; then
docker build -t radlet/radlet_dock:arm -f ./Docker/arm/deploy.Dockerfile .
docker push radlet/radlet_dock:arm
elif [[ "$1" == "-d" || $1 == "--deploy" ]]; then
mkdir -p hub_sensor_data
docker-compose -f ./Docker/arm/deploy.docker-compose.yml up
elif [[ "$1" == "-t" || $1 == "--unit-test" ]]; then
echo "Unit tests to be added soon."
elif [[ "$1" == "-mt" || $1 == "--manual-test" ]]; then
mkdir -p hub_sensor_data
docker-compose -f ./Docker/arm/dev.docker-compose.yml run radlet_dock
elif [[ "$1" == "-e" || $1 == "--env" ]]; then
docker build -t radlet/radlet_dock.env:arm -f ./Docker/arm/env.Dockerfile .
elif [[ "$1" == "-a" || $1 == "-all" ]]; then
docker build -t radlet_dock.test -f ./Docker/arm/dev.Dockerfile .
else
echo "Invalid command. Try ./run_build_test.sh --help"
fi
else
if [[ "$1" == "-b" || $1 == "--build" ]]; then
docker build -t radlet_dock.dev:x64 -f ./Docker/x64/dev.Dockerfile .
elif [[ "$1" == "-ud" || $1 == "--update-deploy" ]]; then
docker build -t radlet/radlet_dock:x64 -f ./Docker/x64/deploy.Dockerfile .
docker push radlet/radlet_dock:x64
elif [[ "$1" == "-d" || $1 == "--deploy" ]]; then
mkdir -p hub_sensor_data
docker-compose -f ./Docker/x64/deploy.docker-compose.yml up
elif [[ "$1" == "-t" || $1 == "--unit-test" ]]; then
echo "Unit tests to be added soon."
elif [[ "$1" == "-mt" || $1 == "--manual-test" ]]; then
mkdir -p hub_sensor_data
docker-compose -f ./Docker/x64/dev.docker-compose.yml run radlet_dock
elif [[ "$1" == "-e" || $1 == "--env" ]]; then
docker build -t radlet/radlet_dock.env:x64 -f ./Docker/x64/env.Dockerfile .
elif [[ "$1" == "-a" || $1 == "-all" ]]; then
docker build -t radlet_dock.test -f ./Docker/x64/dev.Dockerfile .
else
echo "Invalid command. Try ./run_build_test.sh --help"
fi
fi