xci: Configure ansible verbosity based on job type
[releng.git] / jjb / xci / xci-daily-jobs.yml
1 - project:
2     name: 'bifrost-osa-daily'
3 #--------------------------------
4 # BRANCH ANCHORS
5 #--------------------------------
6 # the versions stated here default to branches which then later
7 # on used for checking out the branches, pulling in head of the branch.
8 # but they also allow us to state sha1 so instead of checking out the
9 # branches, we can check out sha1 if we want to use locked/specific
10 # sha1 or manually enter sha1.
11     master: &master
12         stream: master
13         openstack-osa-version: '{stream}'
14         openstack-bifrost-version: '{stream}'
15         opnfv-releng-version: 'master'
16         gs-pathname: ''
17     ocata: &ocata
18         stream: ocata
19         openstack-osa-version: 'stable/{stream}'
20         openstack-bifrost-version: 'stable/{stream}'
21         opnfv-releng-version: 'master'
22         gs-pathname: '/{stream}'
23 #--------------------------------
24 #       scenarios
25 #--------------------------------
26     scenario:
27         # HA scenarios
28         - 'os-nosdn-nofeature-ha':
29             auto-trigger-name: 'daily-trigger-disabled'
30 #--------------------------------
31 #        XCI PODs
32 #--------------------------------
33     pod:
34         - virtual:
35             <<: *master
36         - virtual:
37             <<: *ocata
38 #--------------------------------
39 #        Supported Distros
40 #--------------------------------
41     distro:
42         - 'xenial':
43             disabled: false
44             slave-label: xci-xenial-virtual
45             dib-os-release: 'xenial'
46             dib-os-element: 'ubuntu-minimal'
47             dib-os-packages: 'vlan,vim,less,bridge-utils,sudo,language-pack-en,iputils-ping,rsyslog,curl,python,debootstrap,ifenslave,ifenslave-2.6,lsof,lvm2,tcpdump,nfs-kernel-server,chrony'
48             extra-dib-elements: 'openssh-server'
49         - 'centos7':
50             disabled: true
51             slave-label: xci-centos7-virtual
52             dib-os-release: '7'
53             dib-os-element: 'centos7'
54             dib-os-packages: 'vim,less,bridge-utils,iputils,rsyslog,curl'
55             extra-dib-elements: 'openssh-server'
56         - 'suse':
57             disabled: true
58             slave-label: xci-suse-virtual
59             dib-os-release: '42.2'
60             dib-os-element: 'opensuse-minimal'
61             dib-os-packages: 'vim,less,bridge-utils,iputils,rsyslog,curl'
62             extra-dib-elements: 'openssh-server'
63
64 #--------------------------------
65 # VM defaults
66 #--------------------------------
67 - defaults:
68     name: daily_vm_defaults
69     test-vm-num-nodes: '6'
70     test-vm-node-names: 'xcimaster controller00 controller01 controller02 compute00 compute01'
71     vm-domain-type: 'kvm'
72     vm-cpu: '8'
73     vm-disk: '100'
74     vm-memory-size: '16384'
75     vm-disk-cache: 'unsafe'
76
77 #--------------------------------
78 #        Phases
79 #--------------------------------
80     phase:
81         - 'provision'
82         - 'deploy'
83         - 'functest'
84 #--------------------------------
85 # jobs
86 #--------------------------------
87     jobs:
88         - 'xci-{scenario}-{pod}-{distro}-daily-{stream}'
89         - 'xci-{phase}-{pod}-{distro}-daily-{stream}'
90
91 #--------------------------------
92 # job templates
93 #--------------------------------
94 - job-template:
95     name: 'xci-{scenario}-{pod}-{distro}-daily-{stream}'
96
97     disabled: '{obj:disabled}'
98
99     concurrent: false
100
101     properties:
102         - build-blocker:
103             use-build-blocker: true
104             blocking-jobs:
105                 - '^xci-os.*'
106             block-level: 'NODE'
107         - logrotate-default
108
109     parameters:
110         - string:
111             name: OPENSTACK_OSA_VERSION
112             default: '{openstack-osa-version}'
113         - string:
114             name: OPENSTACK_BIFROST_VERSION
115             default: '{openstack-osa-version}'
116         - string:
117             name: OPNFV_RELENG_VERSION
118             default: '{opnfv-releng-version}'
119         - string:
120             name: USE_PROMOTED_VERSIONS
121             default: 'true'
122         - string:
123             name: DEPLOY_SCENARIO
124             default: '{scenario}'
125         - label:
126             name: SLAVE_LABEL
127             default: '{slave-label}'
128
129     triggers:
130         - '{auto-trigger-name}'
131
132     wrappers:
133         - xci-fix-perms-workspace
134
135     builders:
136         - description-setter:
137             description: "Built on $NODE_NAME"
138         - trigger-builds:
139             - project: 'xci-provision-{pod}-{distro}-daily-{stream}'
140               current-parameters: false
141               predefined-parameters: |
142                 OPENSTACK_OSA_VERSION=$OPENSTACK_OSA_VERSION
143                 OPENSTACK_BIFROST_VERSION=$OPENSTACK_BIFROST_VERSION
144                 OPNFV_RELENG_VERSION=$OPNFV_RELENG_VERSION
145                 USE_PROMOTED_VERSIONS=$USE_PROMOTED_VERSIONS
146                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
147               same-node: true
148               block: true
149         - trigger-builds:
150             - project: 'xci-deploy-{pod}-{distro}-daily-{stream}'
151               current-parameters: false
152               predefined-parameters: |
153                 OPENSTACK_OSA_VERSION=$OPENSTACK_OSA_VERSION
154                 OPENSTACK_BIFROST_VERSION=$OPENSTACK_BIFROST_VERSION
155                 OPNFV_RELENG_VERSION=$OPNFV_RELENG_VERSION
156                 USE_PROMOTED_VERSIONS=$USE_PROMOTED_VERSIONS
157                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
158               same-node: true
159               block: true
160         - trigger-builds:
161             - project: 'xci-functest-{pod}-{distro}-daily-{stream}'
162               current-parameters: false
163               predefined-parameters: |
164                 OPENSTACK_OSA_VERSION=$OPENSTACK_OSA_VERSION
165                 OPENSTACK_BIFROST_VERSION=$OPENSTACK_BIFROST_VERSION
166                 OPNFV_RELENG_VERSION=$OPNFV_RELENG_VERSION
167                 USE_PROMOTED_VERSIONS=$USE_PROMOTED_VERSIONS
168                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
169               same-node: true
170               block: true
171               block-thresholds:
172                 build-step-failure-threshold: 'never'
173                 failure-threshold: 'never'
174                 unstable-threshold: 'FAILURE'
175
176     publishers:
177         - email:
178             recipients: fatih.degirmenci@ericsson.com yroblamo@redhat.com mchandras@suse.de jack.morgan@intel.com julienjut@gmail.com
179
180 - job-template:
181     name: 'xci-{phase}-{pod}-{distro}-daily-{stream}'
182
183     disabled: '{obj:disabled}'
184
185     defaults: daily_vm_defaults
186
187     concurrent: false
188
189     properties:
190         - build-blocker:
191             use-build-blocker: true
192             blocking-jobs:
193                 - '^xci-provision.*'
194                 - '^xci-deploy.*'
195                 - '^xci-functest.*'
196             block-level: 'NODE'
197         - logrotate-default
198
199     parameters:
200         - string:
201             name: OPENSTACK_OSA_VERSION
202             default: '{openstack-osa-version}'
203         - string:
204             name: OPENSTACK_BIFROST_VERSION
205             default: '{openstack-osa-version}'
206         - string:
207             name: OPNFV_RELENG_VERSION
208             default: '{opnfv-releng-version}'
209         - string:
210             name: USE_PROMOTED_VERSIONS
211             default: 'true'
212         - string:
213             name: DEPLOY_SCENARIO
214             default: 'os-nosdn-nofeature-ha'
215         - string:
216             name: DISTRO
217             default: '{distro}'
218         - string:
219             name: DIB_OS_RELEASE
220             default: '{dib-os-release}'
221         - string:
222             name: DIB_OS_ELEMENT
223             default: '{dib-os-element}'
224         - string:
225             name: EXTRA_DIB_ELEMENTS
226             default: '{extra-dib-elements}'
227         - string:
228             name: DIB_OS_PACKAGES
229             default: '{dib-os-packages}'
230         - string:
231             name: TEST_VM_NUM_NODES
232             default: '{test-vm-num-nodes}'
233         - string:
234             name: TEST_VM_NODE_NAMES
235             default: '{test-vm-node-names}'
236         - string:
237             name: VM_DOMAIN_TYPE
238             default: '{vm-domain-type}'
239         - string:
240             name: VM_CPU
241             default: '{vm-cpu}'
242         - string:
243             name: VM_DISK
244             default: '{vm-disk}'
245         - string:
246             name: VM_MEMORY_SIZE
247             default: '{vm-memory-size}'
248         - string:
249             name: VM_DISK_CACHE
250             default: '{vm-disk-cache}'
251         - string:
252             name: CLEAN_DIB_IMAGES
253             default: 'true'
254         - label:
255             name: SLAVE_LABEL
256             default: '{slave-label}'
257         - string:
258             name: ANSIBLE_VERBOSITY
259             default: ''
260
261     wrappers:
262         - xci-fix-perms-workspace
263
264     builders:
265         - description-setter:
266             description: "Built on $NODE_NAME - Scenario: $DEPLOY_SCENARIO"
267         - 'xci-{phase}-builder'
268
269 #---------------------------
270 # wrapper macros
271 #---------------------------
272 - wrapper:
273     name: xci-fix-perms-workspace
274     wrappers:
275         - pre-scm-buildstep:
276           - shell: |
277                 #!/bin/bash
278                 sudo chown -R $USER $WORKSPACE || exit 1
279
280 #---------------------------
281 # builder macros
282 #---------------------------
283 - builder:
284     name: xci-provision-builder
285     builders:
286         - shell:
287             !include-raw: ./xci-provision.sh
288 - builder:
289     name: xci-deploy-builder
290     builders:
291         - shell:
292             !include-raw: ./xci-deploy.sh
293 - builder:
294     name: xci-functest-builder
295     builders:
296         - shell:
297             !include-raw: ./xci-functest.sh