-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathbuild-and-deploy.sh
More file actions
executable file
·39 lines (31 loc) · 1.16 KB
/
build-and-deploy.sh
File metadata and controls
executable file
·39 lines (31 loc) · 1.16 KB
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
#!/usr/bin/env bash
export BASE_IMAGE_NAME=govtool
export PROJECT_NAME=govtool
export CARDANO_NETWORK=sanchonet
export BASE_DOMAIN=govtool.cardanoapi.io
if [ -z "$GOVTOOL_TAG" ]; then
GOVTOOL_TAG="$(git rev-parse HEAD)"
fi
export GOVTOOL_TAG
. ./scripts/deploy-stack.sh
check_env
# Build images
./build-images.sh
function update-service(){
echo '> docker' service update --image "$2" "$1"
docker service update --image "$2" "$1"
}
if [[ "$1" == "update-images" ]]
then
update-service govtool_backend "$BASE_IMAGE_NAME"/backend:${GOVTOOL_TAG}
update-service govtool_frontend "$BASE_IMAGE_NAME"/frontend:${GOVTOOL_TAG}
update-service govtool_metadata-validation "$BASE_IMAGE_NAME"/metadata-validation:${GOVTOOL_TAG}
update-service govtool_storybook "$BASE_IMAGE_NAME"/storybook:${GOVTOOL_TAG}
update-service govaction-loader_backend "$BASE_IMAGE_NAME"/gov-action-loader-backend:${GOVTOOL_TAG}
update-service govaction-loader_frontend "$BASE_IMAGE_NAME"/gov-action-loader-frontend:${GOVTOOL_TAG}
# test metadata API
update-service test_metadata-api "$BASE_IMAGE_NAME"/metadata-api:${GOVTOOL_TAG}
elif [[ $1 == "full" ]]
then
./deploy.sh stack all
fi