forked from graalvm/mandrel-packaging
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun-image.sh
executable file
·64 lines (53 loc) · 1.93 KB
/
run-image.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
#!/usr/bin/env bash
set -e
setEnv() {
if [ -f .env ]; then
set -a
. ./.env
set +a
fi
if [[ -n "${PACKAGING_CLONE}" ]]; then
RUN_OPTIONS="-v ${PACKAGING_CLONE}:/tmp/mandrel-packaging ${RUN_OPTIONS}"
SKIP_PACKAGING=1
fi
if [[ -n "${SKIP_PACKAGING}" ]]; then
RUN_OPTIONS="-e SKIP_PACKAGING=1 ${RUN_OPTIONS}"
fi
if [[ -n "${MANDREL_CLONE}" ]]; then
RUN_OPTIONS="-v ${MANDREL_CLONE}:/tmp/mandrel ${RUN_OPTIONS}"
SKIP_MANDREL=1
fi
if [[ -n "${SKIP_MANDREL}" ]]; then
RUN_OPTIONS="-e SKIP_MANDREL=1 ${RUN_OPTIONS}"
fi
if [[ -n "${MAVEN_REPOSITORY}" ]]; then
RUN_OPTIONS="-v ${MAVEN_REPOSITORY}:/home/mandrel/.m2/repository ${RUN_OPTIONS}"
fi
}
dockerRun() {
echo "Opening an interactive terminal in the latest JDG snapshot builder image"
echo " To build locally:"
echo " ./run.sh --install --version 20.1.0.redhat-00001 --verbose"
echo ""
echo " To build with a maven proxy:"
echo " ./run.sh --install --version 20.1.0.redhat-00001 --maven-proxy https://repo1.maven.org/maven2/ --verbose"
echo ""
echo " To use an alternative maven local repository:"
echo " ./run.sh --install --version 20.1.0.redhat-00001 --maven-local-repository /tmp/.m2/repository --verbose"
echo ""
echo " To override dependencies:"
echo " ./run.sh --install --version 20.1.0.redhat-00001 --dependencies \ "
echo " id=ASM_7.1,version=7.1.0.redhat-00001,sha1=41bc48bf913569bd001cc132624f811d91004af4,sourceSha1=8c938bc977786f0f3964b394e28f31e726769bac \ "
echo " id=...,version=...,sha1=... "
echo ""
echo " To deploy:"
echo " ./run.sh --deploy --version 20.1.0.redhat-00001 --maven-repo-id abc --maven-url http://1.2.3.4 --verbose"
echo ""
docker run -it ${RUN_OPTIONS} --entrypoint /bin/bash mandrel-packaging
exit 0
}
main() {
setEnv
dockerRun
}
main