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