339c3cc5b5ca88a27b151350899f345cd30483ba
[releng.git] / jjb / armband / armband-ci-jobs.yml
1 ---
2 # jenkins job templates for Armband
3 - project:
4     name: 'armband-ci'
5     project: 'armband'
6
7     # -------------------------------
8     # BRANCH ANCHORS
9     # -------------------------------
10     master: &master
11       stream: master
12       branch: '{stream}'
13       gs-pathname: ''
14       disabled: false
15     euphrates: &euphrates
16       stream: euphrates
17       branch: 'stable/{stream}'
18       gs-pathname: '/{stream}'
19       disabled: false
20     # -------------------------------
21     # DEPLOY TYPE ANCHORS
22     # -------------------------------
23     baremetal: &baremetal
24       installer: 'fuel'
25       deploy-type: 'baremetal'
26       slave-label: 'armband-{deploy-type}'
27     virtual: &virtual
28       installer: 'fuel'
29       deploy-type: 'virtual'
30       slave-label: 'armband-{deploy-type}'
31     # -------------------------------
32     # POD, INSTALLER, AND BRANCH MAPPING
33     # -------------------------------
34     # CI POD's
35     # -------------------------------
36     #        euphrates
37     # -------------------------------
38     pod:
39       # yamllint disable rule:key-duplicates
40       - armband-baremetal:
41           <<: *baremetal
42           <<: *euphrates
43       - armband-virtual:
44           <<: *virtual
45           <<: *euphrates
46       # -------------------------------
47       #        master
48       # -------------------------------
49       - armband-baremetal:
50           <<: *baremetal
51           <<: *master
52       - armband-virtual:
53           <<: *virtual
54           <<: *master
55     # yamllint enable rule:key-duplicates
56     # -------------------------------
57     #       scenarios
58     # -------------------------------
59     scenario:
60       # HA scenarios
61       - 'os-nosdn-nofeature-ha':
62           auto-trigger-name: '{installer}-{scenario}-{pod}-{stream}-trigger'
63       - 'os-odl-nofeature-ha':
64           auto-trigger-name: '{installer}-{scenario}-{pod}-{stream}-trigger'
65       - 'os-nosdn-ovs-ha':
66           auto-trigger-name: '{installer}-{scenario}-{pod}-{stream}-trigger'
67
68       # NOHA scenarios
69       - 'os-nosdn-nofeature-noha':
70           auto-trigger-name: '{installer}-{scenario}-{pod}-{stream}-trigger'
71
72     jobs:
73       - '{installer}-{scenario}-{pod}-daily-{stream}'
74       - '{installer}-deploy-{pod}-daily-{stream}'
75
76 ########################
77 # job templates
78 ########################
79 - job-template:
80     name: '{installer}-{scenario}-{pod}-daily-{stream}'
81
82     disabled: '{obj:disabled}'
83
84     concurrent: false
85
86     properties:
87       - logrotate-default
88       - throttle:
89           enabled: true
90           max-total: 4
91           max-per-node: 1
92           option: 'project'
93       - build-blocker:
94           use-build-blocker: true
95           blocking-jobs:
96             - '{installer}-os-.*?-{pod}-daily-.*'
97             - 'armband-verify-.*'
98           block-level: 'NODE'
99
100     wrappers:
101       - build-name:
102           name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO'
103
104     triggers:
105       - '{auto-trigger-name}'
106
107     parameters:
108       - project-parameter:
109           project: '{project}'
110           branch: '{branch}'
111       - '{installer}-defaults':
112           gs-pathname: '{gs-pathname}'
113       - '{slave-label}-defaults':
114           installer: '{installer}'
115       - string:
116           name: DEPLOY_SCENARIO
117           default: '{scenario}'
118
119     builders:
120       - trigger-builds:
121           - project: '{installer}-deploy-{pod}-daily-{stream}'
122             current-parameters: false
123             predefined-parameters:
124               DEPLOY_SCENARIO={scenario}
125             same-node: true
126             block: true
127       - conditional-step:
128           condition-kind: not
129           condition-operand:
130             condition-kind: regex-match
131             regex: 'danube'
132             label: '{stream}'
133           steps:
134             - trigger-builds:
135                 - project: 'functest-{installer}-{pod}-arm-daily-{stream}'
136                   current-parameters: false
137                   predefined-parameters:
138                     DEPLOY_SCENARIO={scenario}
139                   block: true
140                   same-node: true
141                   block-thresholds:
142                     build-step-failure-threshold: 'never'
143                     failure-threshold: 'never'
144                     unstable-threshold: 'FAILURE'
145       - conditional-step:
146           condition-kind: not
147           condition-operand:
148             condition-kind: regex-match
149             regex: 'danube'
150             label: '{stream}'
151           steps:
152             - trigger-builds:
153                 - project: 'yardstick-{installer}-{pod}-daily-{stream}'
154                   current-parameters: false
155                   predefined-parameters:
156                     DEPLOY_SCENARIO={scenario}
157                   block: true
158                   same-node: true
159                   block-thresholds:
160                     build-step-failure-threshold: 'never'
161                     failure-threshold: 'never'
162                     unstable-threshold: 'FAILURE'
163       # 1.here the stream means the SUT stream, dovetail stream is defined in its own job
164       # 2.testsuite proposed_tests here is for new test cases planning to add into OVP
165       # 3.run proposed_tests on Monday, Wednesday and Friday against ha scenario
166       # 4.testsuite default here is for the test cases already added into OVP
167       # 5.run default testsuite on Tuesday against ha scenario
168       # 6.not used for release criteria or compliance,
169       #   only to debug the dovetail tool bugs with arm pods
170       - conditional-step:
171           condition-kind: and
172           condition-operands:
173             - condition-kind: regex-match
174               regex: '-ha$'
175               label: '{scenario}'
176             - condition-kind: day-of-week
177               day-selector: select-days
178               days:
179                 MON: true
180                 WED: true
181                 FRI: true
182               use-build-time: true
183           steps:
184             - trigger-builds:
185                 - project: 'dovetail-{installer}-{pod}-proposed_tests-{stream}'
186                   current-parameters: false
187                   predefined-parameters:
188                     DEPLOY_SCENARIO={scenario}
189                   block: true
190                   same-node: true
191                   block-thresholds:
192                     build-step-failure-threshold: 'never'
193                     failure-threshold: 'never'
194                     unstable-threshold: 'FAILURE'
195       - conditional-step:
196           condition-kind: and
197           condition-operands:
198             - condition-kind: regex-match
199               regex: '-ha$'
200               label: '{scenario}'
201             - condition-kind: day-of-week
202               day-selector: select-days
203               days:
204                 TUES: true
205               use-build-time: true
206           steps:
207             - trigger-builds:
208                 - project: 'dovetail-{installer}-{pod}-default-{stream}'
209                   current-parameters: false
210                   predefined-parameters:
211                     DEPLOY_SCENARIO={scenario}
212                   block: true
213                   same-node: true
214                   block-thresholds:
215                     build-step-failure-threshold: 'never'
216                     failure-threshold: 'never'
217                     unstable-threshold: 'FAILURE'
218       # Armband uses Fuel's log collection project job, no need to duplicate
219       - conditional-step:
220           condition-kind: not
221           condition-operand:
222             condition-kind: regex-match
223             regex: 'danube'
224             label: '{stream}'
225           steps:
226             - trigger-builds:
227                 - project: 'fuel-collect-logs-{deploy-type}-daily-{stream}'
228                   current-parameters: false
229                   predefined-parameters:
230                     DEPLOY_SCENARIO={scenario}
231                   block: true
232                   same-node: true
233                   block-thresholds:
234                     build-step-failure-threshold: 'never'
235                     failure-threshold: 'never'
236                     unstable-threshold: 'FAILURE'
237
238 - job-template:
239     name: '{installer}-deploy-{pod}-daily-{stream}'
240
241     concurrent: true
242
243     properties:
244       - logrotate-default
245       - throttle:
246           enabled: true
247           max-total: 4
248           max-per-node: 1
249           option: 'project'
250       - build-blocker:
251           use-build-blocker: true
252           blocking-jobs:
253             - '{installer}-deploy-{pod}-daily-{stream}'
254             - '{installer}-deploy-generic-daily-.*'
255           block-level: 'NODE'
256
257     parameters:
258       - project-parameter:
259           project: '{project}'
260           branch: '{branch}'
261       - '{installer}-defaults':
262           gs-pathname: '{gs-pathname}'
263       - '{slave-label}-defaults':
264           installer: '{installer}'
265       - string:
266           name: DEPLOY_SCENARIO
267           default: 'os-odl-nofeature-ha'
268
269     scm:
270       - git-scm
271
272     wrappers:
273       - build-name:
274           name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO'
275
276     builders:
277       - shell:
278           !include-raw-escape: ../fuel/fuel-deploy.sh
279
280     publishers:
281       - email:
282           recipients: armband@enea.com
283       - email-jenkins-admins-on-failure
284
285 ########################
286 # trigger macros
287 ########################
288 # CI PODs
289 # ----------------------------------------------------------------
290 # Enea Armband CI Baremetal Triggers running against master branch
291 # ----------------------------------------------------------------
292 - trigger:
293     name: 'fuel-os-nosdn-nofeature-ha-armband-baremetal-master-trigger'
294     triggers:
295       - timed: '0 1 * * 4,6'
296 - trigger:
297     name: 'fuel-os-nosdn-nofeature-noha-armband-baremetal-master-trigger'
298     triggers:
299       - timed: ''
300 - trigger:
301     name: 'fuel-os-odl-nofeature-ha-armband-baremetal-master-trigger'
302     triggers:
303       - timed: '0 1 * * 2,5,7'
304 - trigger:
305     name: 'fuel-os-nosdn-ovs-ha-armband-baremetal-master-trigger'
306     triggers:
307       - timed: '0 1 * * 1,3'
308 # ---------------------------------------------------------------------
309 # Enea Armband CI Baremetal Triggers running against euphrates branch
310 # ---------------------------------------------------------------------
311 - trigger:
312     name: 'fuel-os-nosdn-nofeature-ha-armband-baremetal-euphrates-trigger'
313     triggers:
314       - timed: ''
315 - trigger:
316     name: 'fuel-os-nosdn-nofeature-noha-armband-baremetal-euphrates-trigger'
317     triggers:
318       - timed: ''
319 - trigger:
320     name: 'fuel-os-odl-nofeature-ha-armband-baremetal-euphrates-trigger'
321     triggers:
322       - timed: ''
323 - trigger:
324     name: 'fuel-os-nosdn-ovs-ha-armband-baremetal-euphrates-trigger'
325     triggers:
326       - timed: ''
327
328 # --------------------------------------------------------------
329 # Enea Armband CI Virtual Triggers running against master branch
330 # --------------------------------------------------------------
331 - trigger:
332     name: 'fuel-os-nosdn-nofeature-ha-armband-virtual-master-trigger'
333     triggers:
334       - timed: ''
335 - trigger:
336     name: 'fuel-os-nosdn-nofeature-noha-armband-virtual-master-trigger'
337     triggers:
338       - timed: ''
339 - trigger:
340     name: 'fuel-os-odl-nofeature-ha-armband-virtual-master-trigger'
341     triggers:
342       - timed: ''
343 - trigger:
344     name: 'fuel-os-nosdn-ovs-ha-armband-virtual-master-trigger'
345     triggers:
346       - timed: ''
347 # -------------------------------------------------------------------
348 # Enea Armband CI Virtual Triggers running against euphrates branch
349 # -------------------------------------------------------------------
350 - trigger:
351     name: 'fuel-os-nosdn-nofeature-ha-armband-virtual-euphrates-trigger'
352     triggers:
353       - timed: ''
354 - trigger:
355     name: 'fuel-os-nosdn-nofeature-noha-armband-virtual-euphrates-trigger'
356     triggers:
357       - timed: ''
358 - trigger:
359     name: 'fuel-os-odl-nofeature-ha-armband-virtual-euphrates-trigger'
360     triggers:
361       - timed: ''
362 - trigger:
363     name: 'fuel-os-nosdn-ovs-ha-armband-virtual-euphrates-trigger'
364     triggers:
365       - timed: ''