diff options
author | 2017-02-09 10:14:08 -0500 | |
---|---|---|
committer | 2017-02-09 10:49:52 -0500 | |
commit | ead0ef69879ccdbe40c6997bd399d88b32728add (patch) | |
tree | bd1a1056944ff465c85dad252bdd9282f95fc522 /jjb/apex/apex-deploy.sh | |
parent | 06c5973767bb31c0fdc640bce06ebf09b98f3e2e (diff) |
Apex: Adds gate scenario job
Apex needs a way to run a gate job after basic scenarios (nosdn,
odl-nofeature) pass. We need the capability to specify which scenario
should be the gate. This patch allows us via a comment to specify
'start-gate-scenario: <scenario>' which will start a gate job to
validate that scenario deploys and passes basic functest health check.
Some drawbacks of this approach include only being able to validate a
single scenario per comment + gerrit votes overriding (not true
workflow/pipeline plugin). The positive is this is a fairly small CI
change to enable some much needed verification. It will be the Apex
committers responsibility to issue this comment post Jenkins +1 approval
of pre-gate.
Change-Id: I9a1364bb1cece8b35488d496789a5e83c707b32d
Signed-off-by: Tim Rozet <trozet@redhat.com>
Diffstat (limited to 'jjb/apex/apex-deploy.sh')
-rwxr-xr-x | jjb/apex/apex-deploy.sh | 15 |
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 |