summaryrefslogtreecommitdiffstats
path: root/jjb/apex/apex-deploy.sh
diff options
context:
space:
mode:
Diffstat (limited to 'jjb/apex/apex-deploy.sh')
-rwxr-xr-xjjb/apex/apex-deploy.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/jjb/apex/apex-deploy.sh b/jjb/apex/apex-deploy.sh
index 31c1bed5f..790d2a3aa 100755
--- a/jjb/apex/apex-deploy.sh
+++ b/jjb/apex/apex-deploy.sh
@@ -62,6 +62,21 @@ fi
if [ -z "$DEPLOY_SCENARIO" ]; then
echo "Deploy scenario not set!"
exit 1
+elif [ "$DEPLOY_SCENARIO" == *gate* ]; then
+ echo "Detecting Gating scenario..."
+ if [ -z "$GERRIT_EVENT_COMMENT_TEXT" ]; then
+ echo "ERROR: Gate job triggered without comment!"
+ exit 1
+ else
+ DEPLOY_SCENARIO=$(echo ${GERRIT_EVENT_COMMENT_TEXT} | grep start-gate-scenario | grep -Eo 'os-.*$')
+ if [ -z "$DEPLOY_SCENARIO" ]; then
+ echo "ERROR: Unable to detect scenario in Gerrit Comment!"
+ echo "Format of comment to trigger gate should be 'start-gate-scenario: <scenario>'"
+ exit 1
+ else
+ echo "Gate scenario detected: ${DEPLOY_SCENARIO}"
+ fi
+ fi
fi
# use local build for verify and csit promote