-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild_and_test.sh
executable file
·39 lines (34 loc) · 1020 Bytes
/
build_and_test.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
#!/bin/bash
set -e
# Use "./build_and_test.sh" to run only the tests
# Use "./build_and_test.sh gobuild" to also rebuild the go project
if [[ $1 = "gobuild" ]]; then
echo "Building the go project!"
curdir=$(pwd)
echo "Building launch"
CGO_ENABLED=0 go build -a -installsuffix cgo -o launch .
cd testbin
echo "Building testbin"
CGO_ENABLED=0 go build -a -installsuffix cgo -o testbin .
cd $curdir
echo "Finished building"
else
echo "Skipping go build"
fi
docker build -t morfien101/launch-test:latest -f Dockerfile.test .
docker build -t morfien101/launch-test:debug -f Dockerfile.debug .
echo "#########################"
echo "## Running full config ##"
echo "#########################"
docker run \
-it \
-v $(pwd)/launch.yaml:/launch.yaml \
morfien101/launch-test:latest
#echo "############################"
#echo "## Running minimal config ##"
#echo "############################"
#
#docker run \
# -it \
# -v $(pwd)/launch_minimal.yaml:/launch.yaml \
# morfien101/launch-test:latest