forked from broadinstitute/picard
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild_push_docker.sh
More file actions
executable file
·29 lines (22 loc) · 850 Bytes
/
build_push_docker.sh
File metadata and controls
executable file
·29 lines (22 loc) · 850 Bytes
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
#!/usr/bin/env bash
# This script is used to build and deploy docker images for Picard
if [[ "$1" == "" ]]
then
echo "Usage: build_push_docker.sh <git-tag>"
exit 1
fi
declare -r TAG=${1}
declare -r PICARD_TAG=broadinstitute/picard:${TAG}
declare -r PICARD_CLOUD_TAG=us.gcr.io/broad-gotc-prod/picard-cloud:${TAG}
echo "Will build and push the following docker images:"
echo ${PICARD_TAG}
echo ${PICARD_CLOUD_TAG}
read -p "Is this really what you want to do? " -n 1 -r
echo # (optional) move to a new line
if [[ $REPLY =~ ^[Yy]$ ]]
then
docker build -t ${PICARD_TAG} --build-arg build_command=shadowJar --build-arg jar_name=picard.jar .
docker build -t ${PICARD_CLOUD_TAG} --build-arg build_command=cloudJar --build-arg jar_name=picardcloud.jar .
docker push ${PICARD_TAG}
gcloud docker -- push ${PICARD_CLOUD_TAG}
fi