b227680963
The multi-region job for Tricircle needs to update some environment variables which will be used in the devstack based test environment setup, it's impossible to set these variables in pre_test_hook.sh without sourcing it, which leads to the job failure. gate_hook is a better hook point to do this, many other projects like Octvia, Magnum etc already used this hook point to configure environment variables. It's better to use gate_hook but not pre_test_hook in Tricircle multiregion job Change-Id: I6763d7141895dfc3e94baed92b2c052a698049d1 Signed-off-by: joehuang <joehuang@huawei.com>
102 lines
3.1 KiB
YAML
102 lines
3.1 KiB
YAML
- job-template:
|
|
name: '{pipeline}-tricircle-dsvm-functional-{node}{suffix}'
|
|
node: '{node}'
|
|
|
|
wrappers:
|
|
- build-timeout:
|
|
timeout: 130
|
|
- timestamps
|
|
|
|
builders:
|
|
- link-logs
|
|
- net-info
|
|
- devstack-checkout
|
|
- shell: |
|
|
#!/bin/bash -xe
|
|
export PYTHONUNBUFFERED=true
|
|
export BRANCH_OVERRIDE={branch-override}
|
|
export PROJECTS="openstack/tricircle $PROJECTS"
|
|
export DEVSTACK_GATE_NEUTRON=1
|
|
export DEVSTACK_GATE_TEMPEST=0
|
|
export DEVSTACK_GATE_TEMPEST_ALL_PLUGINS=0
|
|
export DEVSTACK_GATE_TEMPEST_REGEX="tricircle.tempestplugin"
|
|
|
|
export DEVSTACK_LOCAL_CONFIG="enable_plugin tricircle https://git.openstack.org/openstack/tricircle/"
|
|
|
|
if [ "$BRANCH_OVERRIDE" != "default" ] ; then
|
|
export OVERRIDE_ZUUL_BRANCH=$BRANCH_OVERRIDE
|
|
fi
|
|
|
|
function pre_test_hook {{
|
|
cd /opt/stack/new/tricircle/tricircle/tempestplugin/
|
|
./pre_test_hook.sh
|
|
}}
|
|
export -f pre_test_hook
|
|
|
|
function post_test_hook {{
|
|
cd /opt/stack/new/tricircle/tricircle/tempestplugin/
|
|
./post_test_hook.sh
|
|
}}
|
|
export -f post_test_hook
|
|
|
|
cp devstack-gate/devstack-vm-gate-wrap.sh ./safe-devstack-vm-gate-wrap.sh
|
|
./safe-devstack-vm-gate-wrap.sh
|
|
|
|
publishers:
|
|
- test-results
|
|
- devstack-logs
|
|
- console-log
|
|
|
|
- job-template:
|
|
name: '{pipeline}-tricircle-dsvm-multiregion-{node-release}{suffix}'
|
|
node: '{node}'
|
|
|
|
wrappers:
|
|
- build-timeout:
|
|
timeout: 130
|
|
- timestamps
|
|
|
|
builders:
|
|
- link-logs
|
|
- net-info
|
|
- devstack-checkout
|
|
- shell: |
|
|
#!/bin/bash -xe
|
|
export PYTHONUNBUFFERED=true
|
|
export PROJECTS="openstack/tricircle $PROJECTS"
|
|
export DEVSTACK_GATE_CONFIGDRIVE=0
|
|
export DEVSTACK_GATE_NEUTRON=1
|
|
export DEVSTACK_GATE_TEMPEST=0
|
|
export DEVSTACK_GATE_TEMPEST_ALL_PLUGINS=0
|
|
export DEVSTACK_GATE_TEMPEST_REGEX="tricircle.tempestplugin"
|
|
|
|
# Keep localrc to be able to set some vars in pre_test_hook
|
|
export KEEP_LOCALRC=1
|
|
|
|
# Enable multinode mode, so that the subnode(the second node)
|
|
# will be configured to run as second region in pre_test_hook.sh
|
|
export DEVSTACK_GATE_TOPOLOGY="multinode"
|
|
|
|
export BRANCH_OVERRIDE={branch-override}
|
|
if [ "$BRANCH_OVERRIDE" != "default" ] ; then
|
|
export OVERRIDE_ZUUL_BRANCH=$BRANCH_OVERRIDE
|
|
fi
|
|
|
|
function gate_hook {{
|
|
bash -xe $BASE/new/tricircle/tricircle/tempestplugin/gate_hook.sh
|
|
}}
|
|
export -f gate_hook
|
|
|
|
function post_test_hook {{
|
|
bash -xe $BASE/new/tricircle/tricircle/tempestplugin/post_test_hook.sh
|
|
}}
|
|
export -f post_test_hook
|
|
|
|
cp devstack-gate/devstack-vm-gate-wrap.sh ./safe-devstack-vm-gate-wrap.sh
|
|
./safe-devstack-vm-gate-wrap.sh
|
|
|
|
publishers:
|
|
- test-results
|
|
- devstack-logs
|
|
- console-log
|