Fix GIT_BASE, timer and downstream triggers and add POD_NAME parameter
[releng.git] / jjb / fuel / fuel.yml
1 ########################
2 # Job configuration for fuel
3 ########################
4 - project:
5
6     name: fuel
7
8     project: 'fuel'
9
10     installer: 'fuel'
11
12     jobs:
13         - 'fuel-verify-build-{stream}'
14         - 'fuel-verify-virtual-deploy-{stream}'
15         - 'fuel-merge-build-{stream}'
16         - 'fuel-merge-virtual-deploy-{stream}'
17         - 'fuel-daily-{stream}'
18         - 'fuel-build-{stream}'
19         - 'fuel-deploy-{stream}'
20         - 'fuel-lab-reconfig-{stream}'
21
22     stream:
23         - master:
24             branch: 'master'
25             gs-pathname: ''
26
27 ########################
28 # job templates
29 ########################
30
31 - job-template:
32     name: 'fuel-verify-build-{stream}'
33
34     project-type: freestyle
35
36     node: ericsson-build
37
38     concurrent: true
39
40     properties:
41         - throttle:
42             enabled: true
43             max-total: 3
44
45     logrotate:
46         daysToKeep: 30
47         numToKeep: 10
48         artifactDaysToKeep: -1
49         artifactNumToKeep: -1
50
51     parameters:
52         - project-parameter:
53             project: '{project}'
54         - gerrit-parameter:
55             branch: '{branch}'
56         - fuel-parameter:
57             installer: '{installer}'
58             gs-pathname: '{gs-pathname}'
59
60     scm:
61         - gerrit-trigger-scm:
62             credentials-id: '{ssh-credentials}'
63             refspec: '$GERRIT_REFSPEC'
64             choosing-strategy: 'gerrit'
65
66     wrappers:
67         - ssh-agent-credentials:
68             user: '{ssh-credentials}'
69         - timeout:
70             timeout: 360
71             fail: true
72
73     triggers:
74         - gerrit:
75             trigger-on:
76                 - patchset-created-event:
77                     exclude-drafts: 'false'
78                     exclude-trivial-rebase: 'false'
79                     exclude-no-code-change: 'false'
80                 - draft-published-event
81                 - comment-added-contains-event:
82                     comment-contains-value: 'recheck'
83                 - comment-added-contains-event:
84                     comment-contains-value: 'reverify'
85             projects:
86               - project-compare-type: 'ANT'
87                 project-pattern: '{project}'
88                 branches:
89                   - branch-compare-type: 'ANT'
90                     branch-pattern: '**/{branch}'
91
92     builders:
93         - shell:
94             !include-raw ./fuel-build.sh
95 #        - shell:
96 #            !include-raw ./fuel-upload-artifact.sh
97 #        - shell:
98 #            !include-raw ./fuel-workspace-cleanup.sh
99
100 - job-template:
101     name: 'fuel-verify-virtual-deploy-{stream}'
102
103     project-type: freestyle
104
105     node: ericsson-build
106
107     concurrent: true
108
109     properties:
110         - throttle:
111             enabled: true
112             max-total: 2
113             max-per-node: 1
114
115     logrotate:
116         daysToKeep: 30
117         numToKeep: 10
118         artifactDaysToKeep: -1
119         artifactNumToKeep: -1
120
121     parameters:
122         - project-parameter:
123             project: '{project}'
124         - gerrit-parameter:
125             branch: '{branch}'
126         - fuel-parameter:
127             installer: '{installer}'
128             gs-pathname: '{gs-pathname}'
129
130     scm:
131         - gerrit-trigger-scm:
132             credentials-id: '{ssh-credentials}'
133             refspec: '$GERRIT_REFSPEC'
134             choosing-strategy: 'gerrit'
135
136     wrappers:
137         - ssh-agent-credentials:
138             user: '{ssh-credentials}'
139
140     triggers:
141         - gerrit:
142             trigger-on:
143                 - patchset-created-event:
144                     exclude-drafts: 'false'
145                     exclude-trivial-rebase: 'false'
146                     exclude-no-code-change: 'false'
147                 - draft-published-event
148                 - comment-added-contains-event:
149                     comment-contains-value: 'recheck'
150                 - comment-added-contains-event:
151                     comment-contains-value: 'reverify'
152             projects:
153               - project-compare-type: 'ANT'
154                 project-pattern: '{project}'
155                 branches:
156                   - branch-compare-type: 'ANT'
157                     branch-pattern: '**/{branch}'
158             dependency-jobs: 'fuel-verify-build-{stream}'
159
160     builders:
161 #        - shell:
162 #            !include-raw ./fuel-download-artifact.sh
163         - shell:
164             !include-raw ./fuel-virtual-deploy.sh
165 #        - shell:
166 #            !include-raw ./fuel-workspace-cleanup.sh
167
168 - job-template:
169     name: 'fuel-merge-build-{stream}'
170
171     project-type: freestyle
172
173     node: ericsson-build
174
175     concurrent: true
176
177     properties:
178         - throttle:
179             enabled: true
180             max-total: 2
181
182     logrotate:
183         daysToKeep: 30
184         numToKeep: 40
185         artifactDaysToKeep: -1
186         artifactNumToKeep: 5
187
188     parameters:
189         - project-parameter:
190             project: '{project}'
191         - gerrit-parameter:
192             branch: '{branch}'
193         - fuel-parameter:
194             installer: '{installer}'
195             gs-pathname: ''
196     scm:
197         - gerrit-trigger-scm:
198             credentials-id: '{ssh-credentials}'
199             refspec: ''
200             choosing-strategy: 'default'
201
202     wrappers:
203         - ssh-agent-credentials:
204             user: '{ssh-credentials}'
205         - timeout:
206             timeout: 360
207             fail: true
208
209     triggers:
210         - gerrit:
211             trigger-on:
212                 - change-merged-event
213                 - comment-added-contains-event:
214                     comment-contains-value: 'remerge'
215             projects:
216               - project-compare-type: 'ANT'
217                 project-pattern: '{project}'
218                 branches:
219                     - branch-compare-type: 'ANT'
220                       branch-pattern: '**/{branch}'
221
222     builders:
223         - shell:
224             !include-raw ./fuel-build.sh
225 #        - shell:
226 #            !include-raw ./fuel-upload-artifact.sh
227 #        - shell:
228 #            !include-raw ./fuel-workspace-cleanup.sh
229
230 - job-template:
231     name: 'fuel-merge-virtual-deploy-{stream}'
232
233     project-type: freestyle
234
235     node: ericsson-build
236
237     concurrent: true
238
239     properties:
240         - throttle:
241             enabled: true
242             max-total: 2
243             max-per-node: 1
244
245     logrotate:
246         daysToKeep: 30
247         numToKeep: 40
248         artifactDaysToKeep: -1
249         artifactNumToKeep: 5
250
251     parameters:
252         - project-parameter:
253             project: '{project}'
254         - gerrit-parameter:
255             branch: '{branch}'
256         - fuel-parameter:
257             installer: '{installer}'
258             gs-pathname: ''
259     scm:
260         - gerrit-trigger-scm:
261             credentials-id: '{ssh-credentials}'
262             refspec: ''
263             choosing-strategy: 'default'
264
265     wrappers:
266         - ssh-agent-credentials:
267             user: '{ssh-credentials}'
268
269     triggers:
270         - gerrit:
271             trigger-on:
272                 - change-merged-event
273                 - comment-added-contains-event:
274                     comment-contains-value: 'remerge'
275             projects:
276               - project-compare-type: 'ANT'
277                 project-pattern: '{project}'
278                 branches:
279                     - branch-compare-type: 'ANT'
280                       branch-pattern: '**/{branch}'
281             dependency-jobs: 'fuel-merge-build-{stream}'
282
283     builders:
284 #        - shell:
285 #            !include-raw ./fuel-download-artifact.sh
286         - shell:
287             !include-raw ./fuel-virtual-deploy.sh
288 #        - shell:
289 #            !include-raw ./fuel-workspace-cleanup.sh
290
291 - job-template:
292     name: 'fuel-daily-{stream}'
293
294     project-type: freestyle
295
296     node: ericsson-build
297
298     disabled: false
299
300     triggers:
301         - 'fuel-{strem}-trigger'
302
303     parameters:
304         - project-parameter:
305             project: '{project}'
306         - fuel-parameter:
307             installer: '{installer}'
308             gs-pathname: '{gs-pathname}'
309
310     scm:
311         - git-scm:
312             credentials-id: '{ssh-credentials}'
313             refspec: ''
314             branch: '{branch}'
315
316     logrotate:
317         daysToKeep: '{build-days-to-keep}'
318         numToKeep: '{build-num-to-keep}'
319         artifactDaysToKeep: '{build-artifact-days-to-keep}'
320         artifactNumToKeep: '{build-artifact-num-to-keep}'
321
322     builders:
323         - trigger-builds:
324           - project: 'fuel-build-{stream}'
325             git-revision: true
326             block: true
327         - trigger-builds:
328           - project: 'fuel-deploy-{stream}'
329             git-revision: true
330             block: true
331         - trigger-builds:
332           - project: 'functest-fuel-{stream}'
333             block: true
334             block-thresholds:
335                 build-step-failure-threshold: 'never'
336                 failure-threshold: 'never'
337                 unstable-threshold: 'FAILURE'
338         - trigger-builds:
339           - project: 'yardstick-fuel-lf-{stream}'
340             block: true
341             block-thresholds:
342                 build-step-failure-threshold: 'never'
343                 failure-threshold: 'never'
344                 unstable-threshold: 'FAILURE'
345
346     triggers:
347         - 'fuel-{stream}-daily-trigger'
348
349 - job-template:
350     name: 'fuel-build-{stream}'
351
352     project-type: freestyle
353
354     node: ericsson-build
355
356     logrotate:
357         daysToKeep: 30
358         numToKeep: 10
359         artifactDaysToKeep: -1
360         artifactNumToKeep: -1
361
362     parameters:
363         - project-parameter:
364             project: '{project}'
365         - fuel-parameter:
366             installer: '{installer}'
367             gs-pathname: '{gs-pathname}'
368
369     scm:
370         - git-scm:
371             credentials-id: '{ssh-credentials}'
372             refspec: ''
373             branch: '{branch}'
374
375     wrappers:
376         - timeout:
377             timeout: 360
378             fail: true
379
380     builders:
381         - shell:
382             !include-raw ./fuel-build.sh
383         - shell:
384             !include-raw ./fuel-upload-artifact.sh
385         - shell:
386             !include-raw ./fuel-workspace-cleanup.sh
387
388     publishers:
389         - email:
390             recipients: jonas.bjurel@ericsson.com stefan.k.berg@ericsson.com
391
392 - job-template:
393     name: 'fuel-deploy-{stream}'
394
395     project-type: freestyle
396
397     disabled: false
398
399     node: opnfv-jump-2
400
401     parameters:
402         - project-parameter:
403             project: '{project}'
404         - fuel-parameter:
405             installer: '{installer}'
406             gs-pathname: '{gs-pathname}'
407         - string:
408             name: GIT_BASE
409             default: ssh://gerrit.opnfv.org:29418/$PROJECT
410             description: "POD2 has some issues with cloning using https so that's why GIT_BASE is overriden here again."
411
412     scm:
413         - git-scm:
414             credentials-id: '{ssh-credentials}'
415             refspec: ''
416             branch: '{branch}'
417
418     logrotate:
419         daysToKeep: 30
420         numToKeep: 10
421         artifactDaysToKeep: -1
422         artifactNumToKeep: -1
423
424     builders:
425         - shell:
426             !include-raw ./fuel-download-artifact.sh
427         - shell:
428             !include-raw ./fuel-deploy.sh
429
430     publishers:
431         - email:
432             recipients: jonas.bjurel@ericsson.com stefan.k.berg@ericsson.com
433
434 - job-template:
435     name: 'fuel-lab-reconfig-{stream}'
436
437     project-type: freestyle
438
439     disabled: true
440
441     node: master
442
443     logrotate:
444         daysToKeep: 30
445         numToKeep: 10
446         artifactDaysToKeep: -1
447         artifactNumToKeep: -1
448
449     parameters:
450         - project-parameter:
451             project: '{project}'
452         - fuel-parameter:
453             installer: '{installer}'
454             gs-pathname: '{gs-pathname}'
455         - string:
456             name: GIT_BASE
457             default: ssh://gerrit.opnfv.org:29418/$PROJECT
458             description: "Used for overriding the GIT URL coming from parameters macro."
459
460     scm:
461         - git-scm:
462             credentials-id: '{ssh-credentials}'
463             refspec: ''
464             branch: '{branch}'
465
466     properties:
467         - build-blocker:
468             use-build-blocker: true
469             blocking-jobs:
470                 - "apex-daily.*"
471
472     builders:
473         - shell:
474             !include-raw ./fuel-lab-reconfig.sh
475
476 ########################
477 # parameter macros
478 ########################
479 - parameter:
480     name: fuel-parameter
481     parameters:
482         - string:
483             name: INSTALLER
484             default: '{installer}'
485             description: "Installer to use."
486         - string:
487             name: BUILD_DIRECTORY
488             default: $WORKSPACE/build_output
489             description: "Directory where the build artifact will be located upon the completion of the build."
490         - string:
491             name: CACHE_DIRECTORY
492             default: $HOME/opnfv/cache/$INSTALLER
493             description: "Directory where the cache to be used during the build is located."
494         - string:
495             name: GIT_BASE
496             default: https://gerrit.opnfv.org/gerrit/$PROJECT
497             description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW."
498         - string:
499             name: GS_URL
500             default: artifacts.opnfv.org/$PROJECT{gs-pathname}
501             description: "URL to Google Storage."
502
503 ########################
504 # trigger macros
505 ########################
506 - trigger:
507     name: 'fuel-master-daily-trigger'
508     triggers:
509         - timed: '0 3 * * *'