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