diff options
Diffstat (limited to 'jjb/apex')
-rw-r--r-- | jjb/apex/apex-functest-scenario.sh | 18 | ||||
-rw-r--r-- | jjb/apex/apex-verify-jobs.yaml | 4 | ||||
-rw-r--r-- | jjb/apex/apex.yaml | 21 | ||||
-rw-r--r-- | jjb/apex/apex.yaml.j2 | 21 |
4 files changed, 37 insertions, 27 deletions
diff --git a/jjb/apex/apex-functest-scenario.sh b/jjb/apex/apex-functest-scenario.sh new file mode 100644 index 000000000..dcbed4479 --- /dev/null +++ b/jjb/apex/apex-functest-scenario.sh @@ -0,0 +1,18 @@ +#!/bin/bash +set -o errexit +set -o nounset +set -o pipefail + +features=$(echo $DEPLOY_SCENARIO | sed -r -n 's/os-.+-(.+)-(noha|ha)/\1/p') +if [ "$features" == 'rocky' ]; then + functest_scenario=$(echo $DEPLOY_SCENARIO | sed -r -n 's/(os-.+?)-rocky-(noha|ha)/\1-nofeature-\2/p') + echo "DOCKER_TAG=hunter" > functest_scenario +elif [[ "$features" =~ 'rocky' ]]; then + functest_scenario=$(echo $DEPLOY_SCENARIO | sed -r -n 's/(os-.+?)-(.+)_rocky-(noha|ha)/\1-\2-\3/p') + echo "DOCKER_TAG=hunter" > functest_scenario +else + functest_scenario=$DEPLOY_SCENARIO + echo "DOCKER_TAG=$([[ ${BRANCH##*/} == "master" ]] && \ + echo "latest" || echo ${BRANCH##*/})" > functest_scenario +fi +echo "DEPLOY_SCENARIO=$functest_scenario" >> functest_scenario diff --git a/jjb/apex/apex-verify-jobs.yaml b/jjb/apex/apex-verify-jobs.yaml index fb52fa1d9..9cccf6dcd 100644 --- a/jjb/apex/apex-verify-jobs.yaml +++ b/jjb/apex/apex-verify-jobs.yaml @@ -359,6 +359,8 @@ echo "DOCKER_TAG=hunter" > functest_tag elif [[ "$features" =~ 'rocky' ]]; then echo "DOCKER_TAG=hunter" > functest_tag + else + echo "DOCKER_TAG=''" > functest_tag fi - inject: properties-file: functest_tag @@ -371,7 +373,7 @@ current-parameters: false predefined-parameters: | DEPLOY_SCENARIO=$DEPLOY_SCENARIO - DOCKER_TAG=$DOCKER_TAG + DOCKER_TAG="" FUNCTEST_SUITE_NAME=tempest_smoke FUNCTEST_MODE=testcase GERRIT_BRANCH=$GERRIT_BRANCH diff --git a/jjb/apex/apex.yaml b/jjb/apex/apex.yaml index fb0dae121..331158972 100644 --- a/jjb/apex/apex.yaml +++ b/jjb/apex/apex.yaml @@ -576,18 +576,8 @@ 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" == 'rocky' ]; then - functest_scenario=$(echo $DEPLOY_SCENARIO | sed -r -n 's/(os-.+?)-rocky-(noha|ha)/\1-nofeature-\2/p') - echo "DOCKER_TAG=hunter" > functest_scenario - elif [[ "$features" =~ 'rocky' ]]; then - functest_scenario=$(echo $DEPLOY_SCENARIO | sed -r -n 's/(os-.+?)-(.+)_rocky-(noha|ha)/\1-\2-\3/p') - echo "DOCKER_TAG=hunter" > functest_scenario - else - functest_scenario=$DEPLOY_SCENARIO - fi - echo "DEPLOY_SCENARIO=$functest_scenario" >> functest_scenario + - shell: + !include-raw-escape: ./apex-functest-scenario.sh - inject: properties-file: functest_scenario override-build-parameters: true @@ -641,6 +631,10 @@ name: DEPLOY_SCENARIO default: '{scenario}' description: "Scenario to deploy with." + - string: + name: DOCKER_TAG + default: '' + description: Default docker tag to pass to functest properties: - logrotate-default @@ -667,8 +661,9 @@ - name: 'functest-apex-baremetal-daily-{scenario_stream}' node-parameters: true current-parameters: false - predefined-parameters: + predefined-parameters: | DEPLOY_SCENARIO=$DEPLOY_SCENARIO + DOCKER_TAG=$DOCKER_TAG kill-phase-on: NEVER abort-all-job: false git-revision: false diff --git a/jjb/apex/apex.yaml.j2 b/jjb/apex/apex.yaml.j2 index 4d77f4a39..35171523e 100644 --- a/jjb/apex/apex.yaml.j2 +++ b/jjb/apex/apex.yaml.j2 @@ -422,18 +422,8 @@ 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" == 'rocky' ]; then - functest_scenario=$(echo $DEPLOY_SCENARIO | sed -r -n 's/(os-.+?)-rocky-(noha|ha)/\1-nofeature-\2/p') - echo "DOCKER_TAG=hunter" > functest_scenario - elif [[ "$features" =~ 'rocky' ]]; then - functest_scenario=$(echo $DEPLOY_SCENARIO | sed -r -n 's/(os-.+?)-(.+)_rocky-(noha|ha)/\1-\2-\3/p') - echo "DOCKER_TAG=hunter" > functest_scenario - else - functest_scenario=$DEPLOY_SCENARIO - fi - echo "DEPLOY_SCENARIO=$functest_scenario" >> functest_scenario + - shell: + !include-raw-escape: ./apex-functest-scenario.sh - inject: properties-file: functest_scenario override-build-parameters: true @@ -487,6 +477,10 @@ name: DEPLOY_SCENARIO default: '{scenario}' description: "Scenario to deploy with." + - string: + name: DOCKER_TAG + default: '' + description: Default docker tag to pass to functest properties: - logrotate-default @@ -513,8 +507,9 @@ - name: 'functest-apex-baremetal-daily-{scenario_stream}' node-parameters: true current-parameters: false - predefined-parameters: + predefined-parameters: | DEPLOY_SCENARIO=$DEPLOY_SCENARIO + DOCKER_TAG=$DOCKER_TAG kill-phase-on: NEVER abort-all-job: false git-revision: false |