forked from jgrodziski/keycloak-clojure
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild-docker-images.sh
executable file
·47 lines (34 loc) · 1.47 KB
/
build-docker-images.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
#!/usr/bin/env bash
ARTIFACT_NAME=$(clj -M:artifact-name)
ARTIFACT_ID=$(echo "$ARTIFACT_NAME" | cut -f1)
ARTIFACT_VERSION=$(echo "$ARTIFACT_NAME" | cut -f2)
JAR_FILENAME="$ARTIFACT_ID-$ARTIFACT_VERSION.jar"
clj -X:uberjar
docker build . -t jgrodziski/keycloak-clojure-starter:latest
if [ $? -eq 0 ]; then
echo "Successfully built \"keycloak-clojure\"'s docker image with JAR: jgrodziski/keycloak-clojure-starter:latest"
else
echo "Fail to built \"keycloal-clojure\"'s docker image!"
exit 1
fi
#docker build -f DockerfileNative -t jgrodziski/keycloak-clojure-starter-native:latest .
#if [ $? -eq 0 ]; then
# echo "Successfully built \"keycloak-clojure\"'s docker image with native executable: jgrodziski/keycloak-clojure-starter:latest"
#else
# echo "Fail to built \"keycloal-clojure\"'s docker image!"
# exit 1
#fi
docker build . -t jgrodziski/keycloak-clojure-starter:$ARTIFACT_VERSION
if [ $? -eq 0 ]; then
echo "Successfully built \"keycloak-clojure\"'s docker image with JAR: jgrodziski/keycloak-clojure-starter:$ARTIFACT_VERSION"
else
echo "Fail to built \"keycloal-clojure\"'s docker image!"
exit 1
fi
#docker build -f DockerfileNative -t jgrodziski/keycloak-clojure-starter-native:$ARTIFACT_VERSION .
#if [ $? -eq 0 ]; then
# echo "Successfully built \"keycloak-clojure\"'s docker image with native executable: jgrodziski/keycloak-clojure-starter:$ARTIFACT_VERSION"
#else
# echo "Fail to built \"keycloal-clojure\"'s docker image!"
# exit 1
#fi