-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.sh
executable file
·78 lines (65 loc) · 3.08 KB
/
build.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#!/bin/bash
declare -a projects=(
"helidon-se-reactive"
"helidon-se-reactive-native"
"micronaut-imperative"
"micronaut-reactive"
"micronaut-reactive-native"
"quarkus-imperative"
"quarkus-imperative-native"
"quarkus-ogm"
"quarkus-ogm-native"
"quarkus-reactive"
"quarkus-reactive-native"
"spring-boot23-with-sdn-ogm"
"spring-boot24-with-sdn-ogm"
"spring-boot26-with-sdn-ogm"
"spring-data-imperative"
"spring-data-imperative-module-path"
"spring-data-imperative-native"
"spring-data-reactive"
"spring-plain-imperative"
"spring-plain-reactive"
"vertx-spring-data-reactive"
)
declare -t prefix=neo4j-from-the-jvm
for underTest in "${projects[@]}"; do
printf "Building $underTest\n"
if [[ $underTest = helidon*native ]]
then
underTest=${underTest%"-native"}
(cd $underTest && mvn -DskipTests clean package && docker build -f Dockerfile.native --tag neo4j-from-the-jvm/$underTest-native:latest .)
elif [[ $underTest = helidon* ]]
then
(cd $underTest && mvn -DskipTests clean package && docker build --tag neo4j-from-the-jvm/$underTest:latest .)
elif [[ $underTest = micronaut*native ]]
then
underTest=${underTest%"-native"}
(cd $underTest && ./mvnw -DskipTests clean package -Dpackaging=docker-native && docker image tag $underTest:latest neo4j-from-the-jvm/$underTest-native:latest)
elif [[ $underTest = micronaut* ]]
then
(cd $underTest && ./mvnw -DskipTests clean package -Dpackaging=docker -Dimage=neo4j-from-the-jvm/$underTest:latest)
elif [[ $underTest = quarkus-ogm-native ]]
then
underTest=${underTest%"-native"}
(cd $underTest && ./mvnw -DskipTests clean package -Dquarkus.container-image.build=true -Dquarkus.native.builder-image=quay.io/quarkus/ubi-quarkus-native-image:21.3-java17 -Dquarkus.container-image.group=neo4j-from-the-jvm -Dquarkus.container-image.tag=latest -Pnative -Dquarkus.native.container-build=true -Dquarkus.container-image.name=$underTest-native)
elif [[ $underTest = quarkus*native ]]
then
underTest=${underTest%"-native"}
(cd $underTest && ./mvnw -DskipTests clean package -Dquarkus.container-image.build=true -Dquarkus.container-image.group=neo4j-from-the-jvm -Dquarkus.container-image.tag=latest -Pnative -Dquarkus.native.container-build=true -Dquarkus.container-image.name=$underTest-native)
elif [[ $underTest = quarkus* ]]
then
(cd $underTest && ./mvnw -DskipTests clean package -Dquarkus.container-image.build=true -Dquarkus.container-image.group=neo4j-from-the-jvm -Dquarkus.container-image.tag=latest)
elif [[ $underTest = spring-data-imperative-module-path ]]
then
(cd $underTest && ./mvnw -DskipTests clean package && docker build --tag neo4j-from-the-jvm/$underTest:latest .)
elif [[ $underTest = spring* ]]
then
(cd $underTest && ./mvnw -DskipTests clean spring-boot:build-image -Dspring-boot.build-image.imageName=$prefix/$underTest:latest)
elif [[ $underTest = vertx-spring* ]]
then
(cd $underTest && ./mvnw -DskipTests clean spring-boot:build-image -Dspring-boot.build-image.imageName=$prefix/$underTest:latest)
else
echo "No match"
fi
done