project-config/jenkins/jobs/golang-jobs.yaml
Davanum Srinivas e86b99c021 Add a new CI job for k8s-cloud-provider
"local" implies don't use any cloud provider.
"external" implies use the standalone openstack cloud provider.

Change-Id: I8bc8cc87b421df3809f920d0a27a48fb86f52fd4
2017-05-04 20:25:47 -04:00

118 lines
3.6 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
- 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"
export DEVSTACK_LOCAL_CONFIG+=$'\n'"enable_plugin {name} git://git.openstack.org/openstack/{name}"
# Keep localrc to be able to set some vars in post_test_hook
export KEEP_LOCALRC=1
# Run a minimum set of services
export DEVSTACK_LOCAL_CONFIG+=$'\n'"disable_service horizon"
export DEVSTACK_LOCAL_CONFIG+=$'\n'"disable_service s-account"
export DEVSTACK_LOCAL_CONFIG+=$'\n'"disable_service s-container"
export DEVSTACK_LOCAL_CONFIG+=$'\n'"disable_service s-object"
export DEVSTACK_LOCAL_CONFIG+=$'\n'"disable_service s-proxy"
export DEVSTACK_LOCAL_CONFIG+=$'\n'"disable_service ceilometer-acentral"
export DEVSTACK_LOCAL_CONFIG+=$'\n'"disable_service ceilometer-acompute"
export DEVSTACK_LOCAL_CONFIG+=$'\n'"disable_service ceilometer-alarm-evaluator"
export DEVSTACK_LOCAL_CONFIG+=$'\n'"disable_service ceilometer-alarm-notifier"
export DEVSTACK_LOCAL_CONFIG+=$'\n'"disable_service ceilometer-anotification"
export DEVSTACK_LOCAL_CONFIG+=$'\n'"disable_service ceilometer-api"
export DEVSTACK_LOCAL_CONFIG+=$'\n'"disable_service ceilometer-collector"
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}'