Skip to content

Commit

Permalink
updating promote script to work with stable versions (#953)
Browse files Browse the repository at this point in the history
  • Loading branch information
sravanlakkimsetti committed Mar 13, 2023
1 parent 213cdd6 commit 7344df3
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions cje-production/promotion/promoteSites.sh
Original file line number Diff line number Diff line change
Expand Up @@ -425,8 +425,19 @@ then
export BUILD_LABEL_EQ=$DROP_ID
export DROP_ID_EQ=$DROP_ID
else
echo -e "\n\tERROR: DROP_ID, ${DROP_ID}, did not match any expected pattern."
exit 1
PATTERN="^(S)-([[:digit:]]{1})\.([[:digit:]]{2})([[:alnum:]]{3})-([[:digit:]]{12})$"
if [[ "${DROP_ID}" =~ $PATTERN ]]
then
export BUILD_TYPE=${BASH_REMATCH[1]}
export BUILD_TIMESTAMP=${BASH_REMATCH[5]}
# Label and ID are the same, in this case
export BUILD_LABEL=$DROP_ID
export BUILD_LABEL_EQ=$DROP_ID
export DROP_ID_EQ=$DROP_ID
else
echo -e "\n\tERROR: DROP_ID, ${DROP_ID}, did not match any expected pattern."
exit 1
fi
fi

# For initial releases, do not include service in label
Expand Down

0 comments on commit 7344df3

Please sign in to comment.