Only generat IMAGE_NAME if it is undefined
This commit is contained in:
parent
d52e92fddf
commit
c9bd3a4328
@ -11,6 +11,11 @@ set -o nounset
|
|||||||
# Config
|
# Config
|
||||||
MAX_DEPLOY_WAIT='300'
|
MAX_DEPLOY_WAIT='300'
|
||||||
|
|
||||||
|
if [ "${IMAGE_NAME}x" = "x" ]
|
||||||
|
then
|
||||||
|
IMAGE_NAME="${ATAT_DOCKER_REGISTRY_URL}/${PROD_IMAGE_NAME}:${GIT_SHA}"
|
||||||
|
fi
|
||||||
|
|
||||||
# Remove the K8S CA file when the script exits
|
# Remove the K8S CA file when the script exits
|
||||||
function cleanup {
|
function cleanup {
|
||||||
printf "Cleaning up...\n"
|
printf "Cleaning up...\n"
|
||||||
@ -39,7 +44,7 @@ kubectl config use-context travis
|
|||||||
kubectl config current-context
|
kubectl config current-context
|
||||||
|
|
||||||
# Update the ATST deployment
|
# Update the ATST deployment
|
||||||
kubectl -n atat set image deployment.apps/atst atst="${ATAT_DOCKER_REGISTRY_URL}/${PROD_IMAGE_NAME}:${GIT_SHA}"
|
kubectl -n atat set image deployment.apps/atst atst="${IMAGE_NAME}"
|
||||||
|
|
||||||
# Wait for deployment to finish
|
# Wait for deployment to finish
|
||||||
if ! timeout -t "${MAX_DEPLOY_WAIT}" -s INT kubectl -n atat rollout status deployment/atst
|
if ! timeout -t "${MAX_DEPLOY_WAIT}" -s INT kubectl -n atat rollout status deployment/atst
|
||||||
|
Loading…
x
Reference in New Issue
Block a user