-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathdevi
More file actions
executable file
·164 lines (134 loc) · 4.99 KB
/
devi
File metadata and controls
executable file
·164 lines (134 loc) · 4.99 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
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
#!/bin/bash
############################################################
# The Imixs Developer Script
# start, build, hot, setup, deploy
#
############################################################
# Funktion zum Entfernen des '-' Zeichens von einem Parameter
strip_dash() {
echo "$1" | sed 's/^-//'
}
echo " _ _ _ _ "
echo " __| | _____ _(_) | |__ ___| |_ __"
echo " / _\` |/ _ \\ \\ / / | | '_ \\ / _ \\ | \'_ \\"
echo "| (_| | __/\ V /| | | | | | __/ | |_) |"
echo " \__,_|\___| \_/ |_| |_| |_|\___|_| .__/ "
echo " |_| "
echo " Imixs Developer Script..."
echo "_________________________________________"
# Verify params
if [[ "$(strip_dash $1)" == "setup" ]]; then
echo " Dev Setup..."
sudo chmod -R 777 docker/deployments/
echo " starting dev enrvionment..."
fi
if [[ "$(strip_dash $1)" == "docker" ]]; then
echo " Buld Docker Image..."
mvn clean install
# get project version from pom.xml
PROJECT_VERSION=$(cat ./pom.xml | grep -m1 "<version>" | sed 's/.*<version>\(.*\)<\/version>.*/\1/')
WILDFLY_VERSION=$2
DEBUG_MODE=$3
if [[ "$(strip_dash $2)" == "latest" || "$(strip_dash $2)" == "" ]]; then
IMAGENAME=imixs/imixs-office-workflow
WILDFLY_VERSION=29.0.1.Final-jdk17
else
IMAGENAME=imixs/imixs-office-workflow:$PROJECT_VERSION-wildfly-$WILDFLY_VERSION
fi
echo " "
echo " "
echo "Build Docker image"
echo " Project Version=$PROJECT_VERSION"
echo " Wildfly Version=$WILDFLY_VERSION"
echo " Image name = $IMAGENAME"
echo " "
echo " "
docker build --build-arg WILDFLY_VERSION=$WILDFLY_VERSION -t $IMAGENAME .
# Falls Debug-Mode gewünscht ist, erstelle zusätzlich ein Debug-Image
if [[ "$DEBUG_MODE" == "debug" ]]; then
echo " "
echo " "
echo "Building debug image from $IMAGENAME..."
echo " "
docker build -f Dockerfile-debug --build-arg IMIXS_BASE_IMAGE="$IMAGENAME" -t imixs/imixs-office-workflow .
else
# Push image...
docker push $IMAGENAME
fi
echo " "
echo " "
echo "Build finished! "
fi
if [[ "$(strip_dash $1)" == "payara" ]]; then
echo " Buld Docker Image (Payara)..."
mvn clean install -Pauth-oidc
# get project version from pom.xml
PROJECT_VERSION=$(cat ./pom.xml | grep -m1 "<version>" | sed 's/.*<version>\(.*\)<\/version>.*/\1/')
PAYARA_VERSION=$2
DEBUG_MODE=$3
if [[ "$(strip_dash $2)" == "latest" || "$(strip_dash $2)" == "" ]]; then
IMAGENAME=imixs/imixs-office-workflow
PAYARA_VERSION=6.2025.4-jdk17
else
IMAGENAME=imixs/imixs-office-workflow:$PROJECT_VERSION-payara-$PAYARA_VERSION
fi
echo " "
echo " "
echo "Build Docker image"
echo " Project Version=$PROJECT_VERSION"
echo " Payara Version=$PAYARA_VERSION"
echo " Image name = $IMAGENAME"
echo " "
echo " "
docker build -f Dockerfile-payara --build-arg PAYARA_VERSION=$PAYARA_VERSION -t $IMAGENAME ./.
# Falls Debug-Mode gewünscht ist, erstelle zusätzlich ein Debug-Image
# if [[ "$DEBUG_MODE" == "debug" ]]; then
# echo " "
# echo " "
# echo "Building debug image from $IMAGENAME..."
# echo " "
# docker build -f Dockerfile-debug --build-arg IMIXS_BASE_IMAGE="$IMAGENAME" -t imixs/imixs-office-workflow .
# else
# # Push image...
# docker push $IMAGENAME
# fi
echo " "
echo " "
echo "Build finished! "
fi
if [[ "$(strip_dash $1)" == "start" ]]; then
echo " Start Dev Environment..."
docker compose -f ./docker/docker-compose-dev.yaml up
fi
if [[ "$(strip_dash $1)" == "start-ai" ]]; then
echo " Start AI Environment..."
docker compose -f ./docker/docker-compose-ai.yaml up
fi
if [[ "$(strip_dash $1)" == "build" ]]; then
echo " Build and Autodeploy..."
mvn clean install -DskipTests
fi
if [[ "$(strip_dash $1)" == "test" ]]; then
echo " Run JUnit Tests..."
mvn clean test
fi
if [[ "$(strip_dash $1)" == "hot" ]]; then
echo "* Hotdeploy..."
cd *-app
mvn manik-hotdeploy:hotdeploy
cd ..
fi
# Überprüfen, ob keine Parameter übergeben wurden - standard build
if [[ $# -eq 0 ]]; then
echo " Run with ./dev.sh -XXX"
echo " "
echo " -start : start Docker Containers in dev mode"
echo " -start-ai : start Docker Containers in AI mode"
echo " -build : build application and redeploy"
echo " -docker {WILDFLY_VERISON} : build the Docker image (27.0.1.Final-jdk17 | 29.0.1.Final-jdk17 | latest) debug (optional)"
echo " -hot : Manik Hotdeploy"
echo " -test : run tests"
echo " -setup : setup dev environment - rebuild docker containers "
echo "_________________________________________________________________________________________"
echo " "
fi