zuul/tests/fixtures/config/ansible/git/common-config/zuul.yaml

242 lines
5.6 KiB
YAML

- pipeline:
name: check
manager: independent
post-review: true
trigger:
gerrit:
- event: patchset-created
success:
gerrit:
Verified: 1
failure:
gerrit:
Verified: -1
- pipeline:
name: gate
manager: dependent
success-message: Build succeeded (gate).
trigger:
gerrit:
- event: comment-added
approval:
- Approved: 1
success:
gerrit:
Verified: 2
submit: true
failure:
gerrit:
Verified: -2
start:
gerrit:
Verified: 0
precedence: high
- secret:
name: test_secret
data:
username: test-username
password: !encrypted/pkcs1-oaep |
BFhtdnm8uXx7kn79RFL/zJywmzLkT1GY78P3bOtp4WghUFWobkifSu7ZpaV4NeO0s71YUsi1wGZZ
L0LveZjUN0t6OU1VZKSG8R5Ly7urjaSo1pPVIq5Rtt/H7W14Lecd+cUeKb4joeusC9drN3AA8a4o
ykcVpt1wVqUnTbMGC9ARMCQP6eopcs1l7tzMseprW4RDNhIuz3CRgd0QBMPl6VDoFgBPB8vxtJw+
3m0rqBYZCLZgCXekqlny8s2s92nJMuUABbJOEcDRarzibDsSXsfJt1y+5n7yOURsC7lovMg4GF/v
Cl/0YMKjBO5bpv9EM5fToeKYyPGSKQoHOnCYceb3cAVcv5UawcCic8XjhEhp4K7WPdYf2HVAC/qt
xhbpjTxG4U5Q/SoppOJ60WqEkQvbXs6n5Dvy7xmph6GWmU/bAv3eUK3pdD3xa2Ue1lHWz3U+rsYr
aI+AKYsMYx3RBlfAmCeC1ve2BXPrqnOo7G8tnUvfdYPbK4Aakk0ds/AVqFHEZN+S6hRBmBjLaRFW
Z3QSO1NjbBxWnaHKZYT7nkrJm8AMCgZU0ZArFLpaufKCeiK5ECSsDxic4FIsY1OkWT42qEUfL0Wd
+150AKGNZpPJnnP3QYY4W/MWcKH/zdO400+zWN52WevbSqZy90tqKDJrBkMl1ydqbuw1E4ZHvIs=
# This is used by the check-vars job to evaluate variable precedence.
# The name of this secret conflicts with a site variable.
- secret:
name: vartest_site
data:
value: vartest_secret
# This is used by the check-vars job to evaluate variable precedence.
# The name of this secret conflicts with a job variable.
- secret:
name: vartest_job
data:
value: vartest_secret
# This is used by the check-vars job to evaluate variable precedence.
# The name of this secret should not conflict.
- secret:
name: vartest_secret
data:
value: vartest_secret
- job:
name: base
vars:
base_var: 'base_var'
parent: null
nodeset:
nodes:
- name: test_node
label: test_label
- job:
name: python27
run: playbooks/python27.yaml
pre-run: playbooks/pre.yaml
post-run: playbooks/post.yaml
vars:
flagpath: '{{zuul._test.test_root}}/builds/{{zuul.build}}.flag'
roles:
- zuul: bare-role
secrets:
- test_secret
- job:
parent: python27
name: timeout
run: playbooks/timeout.yaml
# Give the job enough time to reach the run phase but less than 60s
# which is the time the run playbook waits to trigger a job timeout.
# It needs to reach the run phase since timeouting in the pre-run phase
# will lead to a job retry.
timeout: 20
- job:
parent: python27
name: post-timeout
post-run: playbooks/timeout.yaml
post-timeout: 5
- job:
parent: python27
name: check-vars
run: playbooks/check-vars.yaml
nodeset:
nodes:
- name: ubuntu-xenial
label: ubuntu-xenial
vars:
vartest_extra: vartest_job
vartest_job: vartest_job
vartest_secret: vartest_job
vartest_site: vartest_job
extra-vars:
vartest_extra: vartest_extra
vartest_site: vartest_extra
secrets:
- vartest_site
- vartest_secret
- job:
parent: python27
name: check-hostvars
run: playbooks/check-hostvars.yaml
nodeset:
nodes:
- name: host1
label: ubuntu-xenial
- name: host2
label: ubuntu-xenial
- name: host3
label: ubuntu-xenial
groups:
- name: group1
nodes:
- host2
- host3
vars:
allvar: all
host-vars:
host1:
hostvar: host
group-vars:
group1:
groupvar: group
- job:
parent: python27
name: check-secret-names
run: playbooks/check-secret-names.yaml
nodeset:
nodes:
- name: ubuntu-xenial
label: ubuntu-xenial
secrets:
- secret: vartest_secret
name: renamed_secret
- job:
name: multiple-parent
run: playbooks/multiple-parent.yaml
nodeset:
nodes:
- name: ubuntu-xenial
label: ubuntu-xenial
groups:
- name: foo
nodes:
- ubuntu-xenial
- name: bar
nodes:
- ubuntu-xenial
- job:
name: multiple-child
parent: multiple-parent
run:
- playbooks/foo.yaml
- playbooks/bar.yaml
post-run: playbooks/foobar-post.yaml
- job:
name: multiple-child-no-run
parent: multiple-parent
post-run: playbooks/multiple-parent-post.yaml
- job:
name: multiple-run
run:
- playbooks/foo.yaml
- playbooks/bar.yaml
post-run: playbooks/foobar-post.yaml
nodeset:
nodes:
- name: ubuntu-xenial
label: ubuntu-xenial
groups:
- name: foo
nodes:
- ubuntu-xenial
- name: bar
nodes:
- ubuntu-xenial
- job:
name: multiple-run-failure
run:
- playbooks/first-fail.yaml
- playbooks/bar.yaml
post-run: playbooks/first-fail-post.yaml
nodeset:
nodes:
- name: ubuntu-xenial
label: ubuntu-xenial
groups:
- name: foo
nodes:
- ubuntu-xenial
- name: bar
nodes:
- ubuntu-xenial
- job:
name: hello
run: playbooks/hello-post.yaml
post-run: playbooks/hello-post.yaml
- job:
parent: python27
name: failpost
run: playbooks/post-broken.yaml
post-run: playbooks/post-broken.yaml