-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuildimage
More file actions
executable file
·66 lines (57 loc) · 1.58 KB
/
Copy pathbuildimage
File metadata and controls
executable file
·66 lines (57 loc) · 1.58 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
#!/usr/bin/env bash
DOCKER_BIN=$(which docker)
if [ -z "$DOCKER_BIN" ]
then
echo "We can't find the docker executable. Docker is required for this build process"
exit
fi
OPENJDK_IMAGE=$(docker images openjdk -q)
if [ -z "$OPENJDK_IMAGE" ]
then
echo "You need to pull down the openjdk docker image for this build"
echo "Pull down now? (y/n)"
read PULLJDK
if [ "$PULLJDK" = "y" ] || [ "$PULLJDK" = "Y" ]
then
docker pull openjdk
else
exit
fi
fi
GRADLE_IMAGE=$(docker images gradlebox -q)
if [ -z "$GRADLE_IMAGE" ]
then
echo "You need to build the gradle box docker image for this build"
echo "Build now? (y/n)"
read BUILDGRADLEBOX
if [ "$BUILDGRADLEBOX" = "y" ] || [ "$BUILDGRADLEBOX" = "Y" ]
then
docker build docker/gradlebox/ -t gradlebox
else
exit
fi
fi
BUILDER_IMAGE=$(docker images formigiobuilder -q)
if [ -z "$BUILDER_IMAGE" ]
then
echo "You need to build the formigio builder box docker image for this build"
echo "Build now? (y/n)"
read BUILDERBOX
if [ "$BUILDERBOX" = "y" ] || [ "$BUILDERBOX" = "Y" ]
then
docker build . -t formigiobuilder -f FormigioBuildDockerfile
else
exit
fi
fi
# TESTINGPARAM=""
# echo "Run without tests? (y/n)"
# read SKIPTESTS
# if [ "$SKIPTESTS" = "y" ]
# then
# TESTINGPARAM="-x test"
# fi
echo "Building the Java App Jar file... "
docker run -v $(pwd):/var/service -w="/var/service" formigiobuilder gradle clean build
echo "Building the Docker Image... "
docker build "." -t commitr_service:latest