project-config/jenkins/jobs/swift.yaml
Clark Boylan 1da21cd869 Only run swift and keystone in swift func jobs
Previously the swift functional jobs ran a default devstack install.
This results in a cloud that works for running the swift test suite, but
require additional setup time that is unnecessary. Only install keystone
and swift as the other services aren't required in order to save job
runtime.

Depends-On: I1ace341721487e4700de308d3d5b800661210fc0
Change-Id: If169ac7c1b595c69e5800a3c88edd60547b577f0
2017-06-02 12:55:36 -07:00

101 lines
3.5 KiB
YAML

- job-template:
name: '{pipeline}-swift-dsvm-functional{special}-{node}{suffix}'
node: '{node}'
wrappers:
- build-timeout:
timeout: 100
- timestamps
builders:
- link-logs
- net-info
- devstack-checkout
- shell: |
#!/bin/bash -xe
export PYTHONUNBUFFERED=true
export FUNCTEST_TIMEOUT=30
# Disable all services
export DEVSTACK_GATE_NO_SERVICES=1
# Add only what we want, keystone + swift
export DEVSTACK_GATE_SWIFT=1
export DEVSTACK_GATE_KEYSTONE=1
# Need to override default which is neutron enabled
export DEVSTACK_GATE_NEUTRON=0
export DEVSTACK_GATE_TEMPEST=0
export DEVSTACK_GATE_EXERCISES=0
export DEVSTACK_GATE_INSTALL_TESTONLY=1
export BRANCH_OVERRIDE={branch-override}
if [ "$BRANCH_OVERRIDE" != "default" ] ; then
export OVERRIDE_ZUUL_BRANCH=$BRANCH_OVERRIDE
fi
if [ "{special}" == "-identity-v3-only" ] ; then
export DEVSTACK_LOCAL_CONFIG="ENABLE_IDENTITY_V2=False"
fi
function post_test_hook {{
cd /opt/stack/new/swift
# Launch V2 auth tests and v1 tests after.
sudo -H -u stack timeout -s 9 ${{FUNCTEST_TIMEOUT}}m tox -e func && \
sudo -H -u stack SWIFT_TEST_CONFIG_FILE=/opt/stack/new/swift/test/sample.conf \
timeout -s 9 ${{FUNCTEST_TIMEOUT}}m tox -e func
}}
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:
- devstack-logs
- console-log
- job-template:
name: '{pipeline}-swiftclient-dsvm-functional{special}-{node}{suffix}'
node: '{node}'
wrappers:
- build-timeout:
timeout: 100
- timestamps
builders:
- link-logs
- net-info
- devstack-checkout
- shell: |
#!/bin/bash -xe
export PYTHONUNBUFFERED=true
export FUNCTEST_TIMEOUT=30
# Disable all services
export DEVSTACK_GATE_NO_SERVICES=1
# Add only what we want, keystone + swift
export DEVSTACK_GATE_SWIFT=1
export DEVSTACK_GATE_KEYSTONE=1
# Need to override default which is neutron enabled
export DEVSTACK_GATE_NEUTRON=0
export DEVSTACK_GATE_TEMPEST=0
export DEVSTACK_GATE_EXERCISES=0
export DEVSTACK_GATE_INSTALL_TESTONLY=1
export BRANCH_OVERRIDE={branch-override}
export DEVSTACK_PROJECT_FROM_GIT=python-swiftclient
if [ "$BRANCH_OVERRIDE" != "default" ] ; then
export OVERRIDE_ZUUL_BRANCH=$BRANCH_OVERRIDE
fi
if [ "{special}" == "-identity-v3-only" ] ; then
export DEVSTACK_LOCAL_CONFIG="ENABLE_IDENTITY_V2=False"
fi
function post_test_hook {{
cd /opt/stack/new/python-swiftclient
# Launch V2 auth tests and v1 tests after.
sudo -H -u stack timeout -s 9 ${{FUNCTEST_TIMEOUT}}m tox -e func && \
sudo -H -u stack SWIFT_TEST_CONFIG_FILE=/opt/stack/new/swift/test/sample.conf \
timeout -s 9 ${{FUNCTEST_TIMEOUT}}m tox -e func
}}
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:
- devstack-logs
- console-log