-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sh
executable file
·51 lines (34 loc) · 933 Bytes
/
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
#!/bin/bash
# Create docker image containing hadoop for fink-broker on k8s
# @author Fabrice Jammes
set -euxo pipefail
DIR=$(cd "$(dirname "$0")"; pwd -P)
. $DIR/conf.sh
usage() {
cat << EOD
Usage: `basename $0` [options]
Available options:
-h this message
Build image containing hadoop for fink-broker on k8s
EOD
}
# get the options
while getopts h c ; do
case $c in
h) usage ; exit 0 ;;
\?) usage ; exit 2 ;;
esac
done
shift `expr $OPTIND - 1`
# This command avoid retrieving build dependencies if not needed
$(ciux get image --check $DIR --env)
if [ $CIUX_BUILD = false ];
then
echo "Build cancelled, image $CIUX_IMAGE_URL already exists and contains current source code"
exit 0
fi
ciux ignite --selector build $DIR
. $CIUXCONFIG
# Build image
docker image build --tag "$CIUX_IMAGE_URL" --build-arg hadoop_image="$STACKABLE_HADOOP_IMAGE" "$DIR"
echo "Build successful"