-
Notifications
You must be signed in to change notification settings - Fork 17
/
docker.sh
executable file
·45 lines (41 loc) · 1.46 KB
/
docker.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
#!/bin/sh
# exit on error, with error code
set -e
# use newer docker build options
export DOCKER_BUILDKIT=1
# set some defaults
DEBUG=${DEBUG:-""}
BRANCH=${BRANCH:-"$(git rev-parse --abbrev-ref HEAD)"}
VERSION=${VERSION:-"$(awk '/version = / { print $4 }' $(dirname $0)/project/Build.scala | sed 's/\"//g')"}
BUILDNUMBER=${bamboo_buildNumber:-local}
GITSHA1=${GITSHA1:-"$(git rev-parse --short HEAD)"}
${DEBUG} docker build --tag clowder/clowder:latest \
--build-arg BRANCH=${BRANCH} \
--build-arg VERSION=${VERSION} \
--build-arg BUILDNUMBER=${BUILDNUMBER} \
--build-arg GITSHA1=${GITSHA1} \
.
${DEBUG} docker build --tag clowder/toolserver:latest \
--build-arg BRANCH=${BRANCH} \
--build-arg VERSION=${VERSION} \
--build-arg BUILDNUMBER=${BUILDNUMBER} \
--build-arg GITSHA1=${GITSHA1} \
scripts/toollaunchservice
${DEBUG} docker build --tag clowder/mongo-init:latest \
--build-arg BRANCH=${BRANCH} \
--build-arg VERSION=${VERSION} \
--build-arg BUILDNUMBER=${BUILDNUMBER} \
--build-arg GITSHA1=${GITSHA1} \
scripts/mongo-init
${DEBUG} docker build --tag clowder/monitor:latest \
--build-arg BRANCH=${BRANCH} \
--build-arg VERSION=${VERSION} \
--build-arg BUILDNUMBER=${BUILDNUMBER} \
--build-arg GITSHA1=${GITSHA1} \
scripts/monitor
${DEBUG} docker build --tag clowder/check:latest \
--build-arg BRANCH=${BRANCH} \
--build-arg VERSION=${VERSION} \
--build-arg BUILDNUMBER=${BUILDNUMBER} \
--build-arg GITSHA1=${GITSHA1} \
scripts/check