Apex: fix deploy and test run job to pass empty refspec
[releng.git] / jjb / compass4nfv / compass-ci-jobs.yml
1 - project:
2
3     name: compass-ci
4
5     installer: 'compass'
6
7     project: 'compass4nfv'
8
9     master: &master
10         stream: master
11         branch: '{stream}'
12         gs-pathname: ''
13         disabled: false
14     danube: &danube
15         stream: danube
16         branch: 'stable/{stream}'
17         gs-pathname: '/{stream}'
18         disabled: false
19 #--------------------------------
20 # POD, INSTALLER, AND BRANCH MAPPING
21 #--------------------------------
22 #        CI PODs
23 #--------------------------------
24     pod:
25         - baremetal:
26             slave-label: compass-baremetal
27             os-version: 'xenial'
28             <<: *master
29         - virtual:
30             slave-label: compass-virtual
31             os-version: 'xenial'
32             <<: *master
33         - baremetal:
34             slave-label: compass-baremetal
35             os-version: 'xenial'
36             <<: *danube
37         - virtual:
38             slave-label: compass-virtual
39             os-version: 'xenial'
40             <<: *danube
41 #--------------------------------
42 #        master
43 #--------------------------------
44         - baremetal-centos:
45             slave-label: 'intel-pod8'
46             os-version: 'centos7'
47             <<: *master
48
49     scenario:
50         - 'os-nosdn-nofeature-ha':
51             disabled: false
52             auto-trigger-name: 'compass-{scenario}-{pod}-{stream}-trigger'
53         - 'os-odl_l2-nofeature-ha':
54             disabled: false
55             auto-trigger-name: 'compass-{scenario}-{pod}-{stream}-trigger'
56         - 'os-odl_l3-nofeature-ha':
57             disabled: false
58             auto-trigger-name: 'compass-{scenario}-{pod}-{stream}-trigger'
59         - 'os-onos-nofeature-ha':
60             disabled: false
61             auto-trigger-name: 'compass-{scenario}-{pod}-{stream}-trigger'
62         - 'os-ocl-nofeature-ha':
63             disabled: false
64             auto-trigger-name: 'compass-{scenario}-{pod}-{stream}-trigger'
65         - 'os-onos-sfc-ha':
66             disabled: false
67             auto-trigger-name: 'compass-{scenario}-{pod}-{stream}-trigger'
68         - 'os-odl_l2-moon-ha':
69             disabled: false
70             auto-trigger-name: 'compass-{scenario}-{pod}-{stream}-trigger'
71         - 'os-nosdn-kvm-ha':
72             disabled: false
73             auto-trigger-name: 'compass-{scenario}-{pod}-{stream}-trigger'
74         - 'os-nosdn-openo-ha':
75             disabled: false
76             auto-trigger-name: 'compass-{scenario}-{pod}-{stream}-trigger'
77
78
79     jobs:
80         - 'compass-{scenario}-{pod}-daily-{stream}'
81         - 'compass-deploy-{pod}-daily-{stream}'
82
83 ########################
84 # job templates
85 ########################
86 - job-template:
87     name: 'compass-{scenario}-{pod}-daily-{stream}'
88
89     disabled: '{obj:disabled}'
90
91     concurrent: true
92
93     properties:
94         - logrotate-default
95         - throttle:
96             enabled: true
97             max-per-node: 1
98             option: 'project'
99         - build-blocker:
100             use-build-blocker: true
101             blocking-jobs:
102                 - 'compass-os-.*?-{pod}-daily-.*?'
103                 - 'compass-os-.*?-baremetal-daily-.*?'
104                 - 'compass-verify-[^-]*-[^-]*'
105             block-level: 'NODE'
106
107     wrappers:
108         - build-name:
109             name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO'
110
111     parameters:
112         - project-parameter:
113             project: '{project}'
114             branch: '{branch}'
115         - compass-ci-parameter:
116             installer: '{installer}'
117             gs-pathname: '{gs-pathname}'
118         - string:
119             name: DEPLOY_SCENARIO
120             default: '{scenario}'
121         - '{slave-label}-defaults'
122         - '{installer}-defaults'
123
124     triggers:
125         - '{auto-trigger-name}'
126
127     builders:
128         - description-setter:
129             description: "POD: $NODE_NAME"
130         - trigger-builds:
131             - project: 'compass-deploy-{pod}-daily-{stream}'
132               current-parameters: true
133               predefined-parameters: |
134                 DEPLOY_SCENARIO={scenario}
135                 COMPASS_OS_VERSION={os-version}
136               same-node: true
137               block: true
138         - trigger-builds:
139             - project: 'functest-compass-{pod}-daily-{stream}'
140               current-parameters: false
141               predefined-parameters:
142                 DEPLOY_SCENARIO={scenario}
143               same-node: true
144               block: true
145               block-thresholds:
146                 build-step-failure-threshold: 'never'
147                 failure-threshold: 'never'
148                 unstable-threshold: 'FAILURE'
149         - trigger-builds:
150             - project: 'yardstick-compass-{pod}-daily-{stream}'
151               current-parameters: false
152               predefined-parameters:
153                 DEPLOY_SCENARIO={scenario}
154               block: true
155               same-node: true
156               block-thresholds:
157                 build-step-failure-threshold: 'never'
158                 failure-threshold: 'never'
159                 unstable-threshold: 'FAILURE'
160         # dovetail only master by now, not sync with A/B/C branches
161         # here the stream means the SUT stream, dovetail stream is defined in its own job
162         # only run on os-(nosdn|odl_l2)-(nofeature|bgpvpn)-ha scenario
163         - conditional-step:
164             condition-kind: regex-match
165             regex: os-(nosdn|odl_l2)-(nofeature|bgpvpn)-ha
166             label: '{scenario}'
167             steps:
168                 - trigger-builds:
169                     - project: 'dovetail-compass-{pod}-proposed_tests-{stream}'
170                       current-parameters: false
171                       predefined-parameters:
172                         DEPLOY_SCENARIO={scenario}
173                       block: true
174                       same-node: true
175                       block-thresholds:
176                         build-step-failure-threshold: 'never'
177                         failure-threshold: 'never'
178                         unstable-threshold: 'FAILURE'
179
180 - job-template:
181     name: 'compass-deploy-{pod}-daily-{stream}'
182
183     disabled: false
184
185     concurrent: true
186
187     properties:
188         - logrotate-default
189         - throttle:
190             enabled: true
191             max-per-node: 1
192             option: 'project'
193         - build-blocker:
194             use-build-blocker: true
195             blocking-jobs:
196                 - 'compass-deploy-{pod}-daily-.*?'
197                 - 'compass-verify-deploy-.*?'
198             block-level: 'NODE'
199
200     wrappers:
201         - build-name:
202             name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO'
203         - timeout:
204             timeout: 120
205             abort: true
206
207     parameters:
208         - project-parameter:
209             project: '{project}'
210             branch: '{branch}'
211         - compass-ci-parameter:
212             installer: '{installer}'
213             gs-pathname: '{gs-pathname}'
214         - '{slave-label}-defaults'
215         - '{installer}-defaults'
216
217     scm:
218         - git-scm
219
220     wrappers:
221         - build-name:
222             name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO'
223
224
225     builders:
226         - description-setter:
227             description: "POD: $NODE_NAME"
228         - shell:
229             !include-raw-escape: ./compass-download-artifact.sh
230         - shell:
231             !include-raw-escape: ./compass-deploy.sh
232
233 ########################
234 # parameter macros
235 ########################
236 - parameter:
237     name: compass-ci-parameter
238     parameters:
239         - string:
240             name: BUILD_DIRECTORY
241             default: $WORKSPACE/build_output
242             description: "Directory where the build artifact will be located upon the completion of the build."
243         - string:
244             name: GS_URL
245             default: '$GS_BASE{gs-pathname}'
246             description: "URL to Google Storage."
247         - choice:
248             name: COMPASS_OPENSTACK_VERSION
249             choices:
250                 - 'newton'
251
252 ########################
253 # trigger macros
254 ########################
255 - trigger:
256     name: 'compass-os-nosdn-nofeature-ha-baremetal-centos-master-trigger'
257     triggers:
258         - timed: '0 19 * * *'
259 - trigger:
260     name: 'compass-os-nosdn-openo-ha-baremetal-centos-master-trigger'
261     triggers:
262         - timed: ''
263 - trigger:
264     name: 'compass-os-odl_l2-nofeature-ha-baremetal-centos-master-trigger'
265     triggers:
266         - timed: '0 23 * * *'
267 - trigger:
268     name: 'compass-os-odl_l3-nofeature-ha-baremetal-centos-master-trigger'
269     triggers:
270         - timed: '0 15 * * *'
271 - trigger:
272     name: 'compass-os-onos-nofeature-ha-baremetal-centos-master-trigger'
273     triggers:
274         - timed: '0 7 * * *'
275 - trigger:
276     name: 'compass-os-ocl-nofeature-ha-baremetal-centos-master-trigger'
277     triggers:
278         - timed: '0 11 * * *'
279 - trigger:
280     name: 'compass-os-onos-sfc-ha-baremetal-centos-master-trigger'
281     triggers:
282         - timed: '0 3 * * *'
283 - trigger:
284     name: 'compass-os-odl_l2-moon-ha-baremetal-centos-master-trigger'
285     triggers:
286         - timed: ''
287 - trigger:
288     name: 'compass-os-nosdn-kvm-ha-baremetal-centos-master-trigger'
289     triggers:
290         - timed: ''
291
292 - trigger:
293     name: 'compass-os-nosdn-nofeature-ha-baremetal-master-trigger'
294     triggers:
295         - timed: '0 2 * * *'
296 - trigger:
297     name: 'compass-os-nosdn-openo-ha-baremetal-master-trigger'
298     triggers:
299         - timed: '0 3 * * *'
300 - trigger:
301     name: 'compass-os-odl_l2-nofeature-ha-baremetal-master-trigger'
302     triggers:
303         - timed: '0 22 * * *'
304 - trigger:
305     name: 'compass-os-odl_l3-nofeature-ha-baremetal-master-trigger'
306     triggers:
307         - timed: '0 18 * * *'
308 - trigger:
309     name: 'compass-os-onos-nofeature-ha-baremetal-master-trigger'
310     triggers:
311         - timed: '0 14 * * *'
312 - trigger:
313     name: 'compass-os-ocl-nofeature-ha-baremetal-master-trigger'
314     triggers:
315         - timed: '0 10 * * *'
316 - trigger:
317     name: 'compass-os-onos-sfc-ha-baremetal-master-trigger'
318     triggers:
319         - timed: '0 6 * * *'
320 - trigger:
321     name: 'compass-os-odl_l2-moon-ha-baremetal-master-trigger'
322     triggers:
323         - timed: ''
324 - trigger:
325     name: 'compass-os-nosdn-kvm-ha-baremetal-master-trigger'
326     triggers:
327         - timed: ''
328
329 - trigger:
330     name: 'compass-os-nosdn-nofeature-ha-baremetal-danube-trigger'
331     triggers:
332         - timed: '0 9 * * *'
333 - trigger:
334     name: 'compass-os-nosdn-openo-ha-baremetal-danube-trigger'
335     triggers:
336         - timed: '0 13 * * *'
337 - trigger:
338     name: 'compass-os-odl_l2-nofeature-ha-baremetal-danube-trigger'
339     triggers:
340         - timed: '0 17 * * *'
341 - trigger:
342     name: 'compass-os-odl_l3-nofeature-ha-baremetal-danube-trigger'
343     triggers:
344         - timed: '0 21 * * *'
345 - trigger:
346     name: 'compass-os-onos-nofeature-ha-baremetal-danube-trigger'
347     triggers:
348         - timed: '0 1 * * *'
349 - trigger:
350     name: 'compass-os-ocl-nofeature-ha-baremetal-danube-trigger'
351     triggers:
352         - timed: '0 5 * * *'
353 - trigger:
354     name: 'compass-os-onos-sfc-ha-baremetal-danube-trigger'
355     triggers:
356         - timed: ''
357 - trigger:
358     name: 'compass-os-odl_l2-moon-ha-baremetal-danube-trigger'
359     triggers:
360         - timed: ''
361 - trigger:
362     name: 'compass-os-nosdn-kvm-ha-baremetal-danube-trigger'
363     triggers:
364         - timed: ''
365
366 - trigger:
367     name: 'compass-os-nosdn-nofeature-ha-virtual-master-trigger'
368     triggers:
369         - timed: '0 21 * * *'
370 - trigger:
371     name: 'compass-os-nosdn-openo-ha-virtual-master-trigger'
372     triggers:
373         - timed: '0 22 * * *'
374 - trigger:
375     name: 'compass-os-odl_l2-nofeature-ha-virtual-master-trigger'
376     triggers:
377         - timed: '0 20 * * *'
378 - trigger:
379     name: 'compass-os-odl_l3-nofeature-ha-virtual-master-trigger'
380     triggers:
381         - timed: '0 19 * * *'
382 - trigger:
383     name: 'compass-os-onos-nofeature-ha-virtual-master-trigger'
384     triggers:
385         - timed: '0 18 * * *'
386 - trigger:
387     name: 'compass-os-ocl-nofeature-ha-virtual-master-trigger'
388     triggers:
389         - timed: '0 16 * * *'
390 - trigger:
391     name: 'compass-os-onos-sfc-ha-virtual-master-trigger'
392     triggers:
393         - timed: '0 15 * * *'
394 - trigger:
395     name: 'compass-os-odl_l2-moon-ha-virtual-master-trigger'
396     triggers:
397         - timed: '0 14 * * *'
398 - trigger:
399     name: 'compass-os-nosdn-kvm-ha-virtual-master-trigger'
400     triggers:
401         - timed: ''
402
403 - trigger:
404     name: 'compass-os-nosdn-nofeature-ha-virtual-danube-trigger'
405     triggers:
406         - timed: '0 21 * * *'
407 - trigger:
408     name: 'compass-os-nosdn-openo-ha-virtual-danube-trigger'
409     triggers:
410         - timed: '0 22 * * *'
411 - trigger:
412     name: 'compass-os-odl_l2-nofeature-ha-virtual-danube-trigger'
413     triggers:
414         - timed: '0 20 * * *'
415 - trigger:
416     name: 'compass-os-odl_l3-nofeature-ha-virtual-danube-trigger'
417     triggers:
418         - timed: '0 19 * * *'
419 - trigger:
420     name: 'compass-os-onos-nofeature-ha-virtual-danube-trigger'
421     triggers:
422         - timed: '0 18 * * *'
423 - trigger:
424     name: 'compass-os-ocl-nofeature-ha-virtual-danube-trigger'
425     triggers:
426         - timed: ''
427 - trigger:
428     name: 'compass-os-onos-sfc-ha-virtual-danube-trigger'
429     triggers:
430         - timed: '0 15 * * *'
431 - trigger:
432     name: 'compass-os-odl_l2-moon-ha-virtual-danube-trigger'
433     triggers:
434         - timed: '0 14 * * *'
435 - trigger:
436     name: 'compass-os-nosdn-kvm-ha-virtual-danube-trigger'
437     triggers:
438         - timed: ''