-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·33 lines (24 loc) · 749 Bytes
/
Copy pathbuild.sh
File metadata and controls
executable file
·33 lines (24 loc) · 749 Bytes
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
source deployment/env/local.cosmin.env
set -e
function buildGatewayImage {
echo "Run tests"
mvn -s .mvn/settings.xml clean verify
echo "Build jar"
mvn -s .mvn/settings.xml -pl ws-gateway-api clean package spring-boot:repackage -DskipTests
echo "Build docker image"
cp -f ws-gateway-api/target/ws-gateway-api-*.jar deployment/gateway/gateway.jar
docker build -t ws-gateway:${VERSION} deployment/gateway
rm -rf deployment/gateway/gateway.jar
echo "Done"
}
if [ $1 = "gateway" ]; then
echo "Build gateway"
buildGatewayImage
elif [ $1 = "prometheus" ]; then
echo "Build prometheus"
docker build -t ws-gateway/prometheus:${VERSION} deployment/prometheus
echo "Done"
else
echo "Build gateway"
buildGatewayImage
fi