1
0
Fork 0
llvm-premerge-checks/containers/jenkins-master/build_deploy.sh

17 lines
423 B
Bash
Raw Normal View History

2019-10-04 10:26:20 +02:00
#!/bin/bash
set -eux
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
ROOT_DIR="$(dirname $(dirname ${DIR}))"
# get config options
source "${ROOT_DIR}/k8s_config"
IMAGE_NAME="jenkins-master"
QUALIFIED_NAME="${GCR_HOSTNAME}/${GCP_PROJECT}/${IMAGE_NAME}"
docker build -t ${IMAGE_NAME} .
docker tag ${IMAGE_NAME} ${QUALIFIED_NAME}
docker push ${QUALIFIED_NAME}
echo "Deployed as ${QUALIFIED_NAME}."