Apex: Adds ability to force snapshot promotion 61/63661/1
authorTim Rozet <trozet@redhat.com>
Wed, 17 Oct 2018 14:29:39 +0000 (10:29 -0400)
committerTim Rozet <trozet@redhat.com>
Wed, 17 Oct 2018 14:29:39 +0000 (10:29 -0400)
We want the ability to be able to force a promotion and skip CSIT. This
patch introduces a variable we can use when manually triggering a
promotion job to force promotion. The use case here is for HA scenarios
we have no snapshots because CSIT always fails. We want to be able to
force promotions for this case to at least have some snapshot available.

Change-Id: I7e81b458f4169596929f032e9394695477fbb940
Signed-off-by: Tim Rozet <trozet@redhat.com>
jjb/apex/apex.yaml
jjb/apex/apex.yaml.j2
jjb/cperf/cperf-robot-netvirt-csit.sh

index 5a8f241..b05da22 100644 (file)
           name: ODL_BRANCH
           default: '{odl_branch}'
           description: ODL branch being used
-
+      - string:
+          name: FORCE_PROMOTE
+          default: 'False'
+          description: "Used to force promotion and skip CSIT"
     properties:
       - build-blocker:
           use-build-blocker: true
                 SSH_KEY_PATH=/tmp/csit/id_rsa
                 ODL_CONTAINERIZED=true
                 OS_VERSION=$OS_VERSION
+                SKIP_CSIT=$FORCE_PROMOTE
               node-parameters: true
               kill-phase-on: NEVER
               abort-all-job: false
index 908acb6..35a696a 100644 (file)
           name: ODL_BRANCH
           default: '{odl_branch}'
           description: ODL branch being used
-
+      - string:
+          name: FORCE_PROMOTE
+          default: 'False'
+          description: "Used to force promotion and skip CSIT"
     properties:
       - build-blocker:
           use-build-blocker: true
                 SSH_KEY_PATH=/tmp/csit/id_rsa
                 ODL_CONTAINERIZED=true
                 OS_VERSION=$OS_VERSION
+                SKIP_CSIT=$FORCE_PROMOTE
               node-parameters: true
               kill-phase-on: NEVER
               abort-all-job: false
index abd62a3..892f0aa 100755 (executable)
@@ -4,6 +4,11 @@ set -o errexit
 set -o nounset
 set -o pipefail
 
+if [[ ! -z ${SKIP_CSIT+x} && "$SKIP_CSIT" == "True" ]]; then
+  echo "Skipping csit run"
+  exit 0
+fi
+
 if [ "$OS_VERSION" == 'master' ]; then
   FULL_OS_VER='master'
 else