-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathspm-ui-upgrade-helper.sh
executable file
·61 lines (52 loc) · 1.83 KB
/
spm-ui-upgrade-helper.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
#!/usr/bin/sh
ERROR=
if [[ -z "$VERSION" ]]; then
echo ERROR: Missing version argument
ERROR=true
fi
if [[ -z "$INPUT_FOLDER" ]]; then
echo ERROR: Missing input folder argument
ERROR=true
fi
if [[ -z "$OUTPUT_FOLDER" ]]; then
echo ERROR: Missing output folder argument
ERROR=true
fi
if [[ -z "$INPUT_FOLDER/EJBServer/build" ]]; then
echo ERROR: The ServerAccessBean path is missing. Build the server or the model to generate EJBserver/build, e.g. serverbuild.model
ERROR=true
fi
if [[ -n "$ERROR" ]]; then
echo Usage: error
exit 1
fi
if [[ "$DETACH" == "true" ]]; then
DETACH_CMD=--detach
else
DETACH_CMD=
fi
echo Starting spm-ui-upgrade-helper
echo
echo VERSION = $VERSION
echo INPUT_FOLDER = $INPUT_FOLDER
echo OUTPUT_FOLDER = $OUTPUT_FOLDER
echo DETACH_CMD = $DETACH_CMD
echo CURAM_VERSION = $CURAM_VERSION
echo
docker-compose rm -v -s -f
docker image rm -f whgovspm/theia:v1.14.0
echo Logging in to Docker Hub...
docker login
if [ "$?" != 0 ]; then echo "Error: Could not log in to Docker repo."; exit 1; fi
docker pull whgovspm/theia:v1.14.0
docker pull whgovspm/spm-ui-upgrade-helper:$VERSION
docker tag whgovspm/spm-ui-upgrade-helper:$VERSION spm-ui-upgrade-helper
docker pull whgovspm/spm-ui-upgrade-helper_nodefront:$VERSION
docker tag whgovspm/spm-ui-upgrade-helper_nodefront:$VERSION spm-ui-upgrade-helper_nodefront
docker pull whgovspm/spm-ui-upgrade-helper_beanparser:$VERSION
docker tag whgovspm/spm-ui-upgrade-helper_beanparser:$VERSION spm-ui-upgrade-helper_beanparser
docker image rm -f whgovspm/spm-ui-upgrade-helper_beanparser:$VERSION
docker image rm -f whgovspm/spm-ui-upgrade-helper_nodefront:$VERSION
docker image rm -f whgovspm/spm-ui-upgrade-helper:$VERSION
docker-compose up $DETACH_CMD --no-build
if [ "$?" != 0 ]; then echo "Error: Could not run $VERSION version."; exit 1; fi