From 8fb75d622a761944c08215e90dd9a7a933edbc99 Mon Sep 17 00:00:00 2001 From: Administrator <admin@example.com> Date: Fri, 12 May 2023 03:51:26 +0000 Subject: [PATCH] Update generate-deploy-stages.sh --- generate-deploy-stages.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/generate-deploy-stages.sh b/generate-deploy-stages.sh index 50c1432..b2b5f2d 100644 --- a/generate-deploy-stages.sh +++ b/generate-deploy-stages.sh @@ -3,11 +3,11 @@ set -e basedir=$( cd "$(dirname "$0")" ; pwd -P ) echo TRIGGER_PAYLOAD=$TRIGGER_PAYLOAD -cat $TRIGGER_PAYLOAD +cat $TRIGGER_PAYLOAD cat $TRIGGER_PAYLOAD | python3 -c "import sys, json; print(json.loads(json.load(sys.stdin)['payload'])['ref'])" | grep "uat" TAG=$(cat ${TRIGGER_PAYLOAD} | python3 -c "import sys, json; print(json.loads(json.load(sys.stdin)['payload'])['ref'])" | grep "uat") touch deploy.yml -if [ -z "${TAG}" ]; then +if [ ! -z "${TAG}" ]; then git clone --single-branch --branch ${TAG} https://github.com/MAAP-Project/maap-workspaces.git pushd maap-workspaces find base_images -type d -depth 1 > ${basedir}/images.txt @@ -17,6 +17,7 @@ if [ -z "${TAG}" ]; then do export BASE_IMAGE_TYPE=$(basename ${image}) export TAG=${TAG} + export DIT_REGISTRY=${DIT_REGISTRY} cat ${template} | CI_JOB_TOKEN='$CI_JOB_TOKEN' CI_REGISTRY='$CI_REGISTRY' envsubst >> deploy.yml done fi -- GitLab