Signed-off-by: Cian Johnston <cian.johnston@est.tech>
Change-Id: I8d150fc52e9632faa9f67bae64b1da3c944d06fe
# this scripts is used by all engine repos so we need to determine what this change is for
export ENGINE_COMPONENT="${GERRIT_PROJECT//*\//}"
# this scripts is used by all engine repos so we need to determine what this change is for
export ENGINE_COMPONENT="${GERRIT_PROJECT//*\//}"
+# Check if we need to override the deploy scenario.
+if ! echo "$GERRIT_CHANGE_COMMIT_MESSAGE" | grep -qs "^Deploy-Scenario:"; then
+ echo "Info : No DEPLOY_SCENARIO override found."
+else
+ echo "Info : DEPLOY_SCENARIO override found!"
+ echo "Info : Before override: DEPLOY_SCENARIO=${DEPLOY_SCENARIO}"
+ DEPLOY_SCENARIO=$(echo "$GERRIT_CHANGE_COMMIT_MESSAGE" | grep '^Deploy-Scenario:' | cut -d ":" -f2 | sed 's/\s*//g')
+ export DEPLOY_SCENARIO
+ echo "Info : After override: DEPLOY_SCENARIO=${DEPLOY_SCENARIO}"
+fi
+
echo "Info : Setting STACK_TYPE and STACK_VERSION"
if [[ "$GERRIT_PROJECT" =~ /stack/ ]]; then
# set vars
echo "Info : Setting STACK_TYPE and STACK_VERSION"
if [[ "$GERRIT_PROJECT" =~ /stack/ ]]; then
# set vars