1
0
Fork 0
llvm-premerge-checks/containers/jenkins-master/build_deploy.sh
2019-10-04 10:26:20 +02:00

17 lines
No EOL
423 B
Bash
Executable file

#!/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}."