project-config/jenkins/jobs/golang-jobs.yaml
Andreas Jaeger 6da9309ec7 Use local_conf where possible
Use local_conf stanz for some more files where possible.

Change-Id: I243894987593aa5f51e28564761f0679676f3d30
2017-07-15 19:04:49 +02:00

120 lines
3.2 KiB
YAML

- job-template:
name: 'gate-{name}-fmt-{node}'
node: '{node}'
builders:
- print-template-name:
template-name: "{template-name}"
- link-logs
- zuul-git-prep
- install-distro-packages
- extra-test-setup
- revoke-sudo
- shell: |
#!/bin/bash -xe
make env fmt
publishers:
- console-log
- job-template:
name: 'gate-{name}-unit-{node}'
node: '{node}'
builders:
- print-template-name:
template-name: "{template-name}"
- link-logs
- zuul-git-prep
- install-distro-packages
- extra-test-setup
- revoke-sudo
- shell: |
#!/bin/bash -xe
make env test
publishers:
- console-log
- job-template:
name: 'gate-{name}-golang-dsvm-{suite}-{node}'
node: ubuntu-xenial
wrappers:
- build-timeout:
timeout: 180
- timestamps
builders:
- link-logs
- net-info
- devstack-checkout
- local_conf:
conf: |
[[local|localrc]]
enable_plugin {name} git://git.openstack.org/openstack/{name}
# Run a minimum set of services
disable_service horizon
disable_service s-account
disable_service s-container
disable_service s-object
disable_service s-proxy
disable_service ceilometer-acentral
disable_service ceilometer-acompute
disable_service ceilometer-alarm-evaluator
disable_service ceilometer-alarm-notifier
disable_service ceilometer-anotification
disable_service ceilometer-api
disable_service ceilometer-collector
- shell: |
#!/bin/bash -xe
export PYTHONUNBUFFERED=true
# Disable tempest and exercises
export DEVSTACK_GATE_TEMPEST=0
export DEVSTACK_GATE_TEMPEST_NOTESTS=1
export DEVSTACK_GATE_EXERCISES=0
export PROJECTS="openstack/{name} $PROJECTS"
# Keep localrc to be able to set some vars in post_test_hook
export KEEP_LOCALRC=1
function pre_test_hook {{
if [[ -f "$BASE/new/{name}/contrib/pre_test_hook.sh" ]]; then
source $BASE/new/{name}/contrib/pre_test_hook.sh {suite}
fi
}}
export -f pre_test_hook
function gate_hook {{
if [[ -f "$BASE/new/{name}/contrib/gate_hook.sh" ]]; then
source $BASE/new/{name}/contrib/gate_hook.sh {suite}
else
$BASE/new/devstack-gate/devstack-vm-gate.sh
fi
}}
export -f gate_hook
function post_test_hook {{
if [[ -f "$BASE/new/{name}/contrib/post_test_hook.sh" ]]; then
source $BASE/new/{name}/contrib/post_test_hook.sh {suite}
fi
}}
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-group:
name: golang-jobs
node: ubuntu-xenial
jobs:
- 'gate-{name}-fmt-{node}'
- 'gate-{name}-unit-{node}'