Merge "Select the right Functest repos when master"
[releng.git] / jjb / apex / apex.yaml.j2
index aeefb5d..4f424b6 100644 (file)
@@ -25,7 +25,7 @@
           build-slave: 'apex-build-master'
           virtual-slave: 'apex-virtual-master'
           baremetal-slave: 'apex-baremetal-master'
-          verify-scenario: 'os-nosdn-nofeature-ha'
+          verify-scenario: 'os-nosdn-nofeature-noha'
           scenario_stream: 'master'
           disable_daily: false
           disable_promote: false
               kill-phase-on: NEVER
               abort-all-job: true
               git-revision: false
+      - shell: |
+          if echo $DEPLOY_SCENARIO | grep queens &> /dev/null; then
+            echo 'REPO=opnfv' > functest_properties
+          else
+            echo 'REPO=ollivier' > functest_properties
+          fi
+          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_properties
+      - inject:
+          properties-file: functest_properties
+          override-build-parameters: true
       - multijob:
           name: 'OPNFV Test Suite'
           condition: ALWAYS
             - 'apex-runner.*'
             - 'apex-daily.*'
             - 'apex-csit-promote.*'
+            - 'odl-netvirt.*'
       - throttle:
           max-per-node: 1
           max-total: 10
     name: 'apex-danube'
     triggers:
       - timed: '0 3 1 1 7'
-