Apex: Removes branch from functest scenario 57/60057/1
authorTim Rozet <trozet@redhat.com>
Fri, 20 Jul 2018 15:17:19 +0000 (11:17 -0400)
committerTim Rozet <trozet@redhat.com>
Fri, 20 Jul 2018 15:17:19 +0000 (11:17 -0400)
Branch is messing up functest detection of deploy scenarios. Therefore
this patch removes the branch from the scenario before passing it to the
test job.

Change-Id: I1b59125941e839f1937cba565c73e39efb460573
Signed-off-by: Tim Rozet <trozet@redhat.com>
jjb/apex/apex.yaml
jjb/apex/apex.yaml.j2

index d019fbe..2e615b3 100644 (file)
               kill-phase-on: NEVER
               abort-all-job: true
               git-revision: false
+      - shell: |
+          features=$(echo $DEPLOY_SCENARIO | sed -r -n 's/os-.+-(.+)-(noha|ha)/\1/p')
+          if [ "$features" == 'queens' ]; then
+            functest_scenario=$(echo $DEPLOY_SCENARIO | sed -r -n 's/(os-.+?)-queens-(noha|ha)/\1-nofeature-\2/p')
+          elif [[ "$features" =~ 'queens' ]]; then
+            functest_scenario=$(echo $DEPLOY_SCENARIO | sed -r -n 's/(os-.+?)-(.+)_queens-(noha|ha)/\1-\2-\3/p')
+          else
+            functest_scenario=$DEPLOY_SCENARIO
+          fi
+          echo "DEPLOY_SCENARIO=$functest_scenario" > functest_scenario
+      - inject:
+          properties-file: functest_scenario
+          override-build-parameters: true
       - multijob:
           name: 'OPNFV Test Suite'
           condition: ALWAYS
index aeefb5d..e23718e 100644 (file)
               kill-phase-on: NEVER
               abort-all-job: true
               git-revision: false
+      - shell: |
+          features=$(echo $DEPLOY_SCENARIO | sed -r -n 's/os-.+-(.+)-(noha|ha)/\1/p')
+          if [ "$features" == 'queens' ]; then
+            functest_scenario=$(echo $DEPLOY_SCENARIO | sed -r -n 's/(os-.+?)-queens-(noha|ha)/\1-nofeature-\2/p')
+          elif [[ "$features" =~ 'queens' ]]; then
+            functest_scenario=$(echo $DEPLOY_SCENARIO | sed -r -n 's/(os-.+?)-(.+)_queens-(noha|ha)/\1-\2-\3/p')
+          else
+            functest_scenario=$DEPLOY_SCENARIO
+          fi
+          echo "DEPLOY_SCENARIO=$functest_scenario" > functest_scenario
+      - inject:
+          properties-file: functest_scenario
+          override-build-parameters: true
       - multijob:
           name: 'OPNFV Test Suite'
           condition: ALWAYS