fba4231970ace7fe8bbb336717926dcd7270a3b5
[releng.git] / jjb / genesis / genesis.yml
1 - project:
2     name: genesis
3     jobs:
4         - 'genesis-daily-master'
5         - 'genesis-merge'
6         - 'genesis-verify'
7         - 'genesis-foreman-daily-master'
8         - 'genesis-fuel-daily-master'
9         - 'genesis-opensteak-daily-master'
10         - 'genesis-build'
11         - 'genesis-deploy'
12         - 'genesis-test'
13
14     # stream:    branch with - in place of / (eg. stable-helium)
15     # branch:    branch (eg. stable/helium)
16     stream:
17         - master:
18             branch: 'master'
19
20     project: 'genesis'
21
22 - job-template:
23     name: 'genesis-daily-master'
24
25     # Job template for daily builders
26     #
27     # Required Variables:
28     #     stream:    branch with - in place of / (eg. stable)
29     #     branch:    branch (eg. stable)
30
31     project-type: freestyle
32     node: fuel
33
34     logrotate:
35         daysToKeep: '{build-days-to-keep}'
36         numToKeep: '{build-num-to-keep}'
37         artifactDaysToKeep: '{build-artifact-days-to-keep}'
38         artifactNumToKeep: '{build-artifact-num-to-keep}'
39
40     parameters:
41         - project-parameter:
42             project: '{project}'
43
44     scm:
45         - git-scm:
46             credentials-id: '{ssh-credentials}'
47             refspec: ''
48             branch: '{branch}'
49
50     wrappers:
51         - ssh-agent-credentials:
52             user: '{ssh-credentials}'
53
54     triggers:
55         - timed: 'H H * * *'
56
57     builders:
58         - shell: |
59             hostname
60             whoami
61             docker --version
62             cd fuel-build/docker
63             pwd
64             echo foo
65             make clean || true
66             make
67             cd ..
68             echo foo
69             make clean || true
70             make all
71             if [[ -d /var/www/genesis-fuel/daily ]]; then sudo rm /var/www/genesis-fuel/daily; fi
72             sudo ln -s /home/jenkins-ci/workspace/genesis-daily-master/fuel-build/release/ /var/www/genesis-fuel/daily
73
74 - job-template:
75     name: 'genesis-verify'
76
77     project-type: freestyle
78     node: fuel
79
80     logrotate:
81         daysToKeep: 30
82         numToKeep: 10
83         artifactDaysToKeep: -1
84         artifactNumToKeep: -1
85
86     parameters:
87         - project-parameter:
88             project: '{project}'
89         - gerrit-parameter:
90             branch: 'master'
91     scm:
92         - gerrit-trigger-scm:
93             credentials-id: '{ssh-credentials}'
94             refspec: '$GERRIT_REFSPEC'
95             choosing-strategy: 'gerrit'
96
97     wrappers:
98         - ssh-agent-credentials:
99             user: '{ssh-credentials}'
100
101     triggers:
102         - gerrit:
103             trigger-on:
104                 - patchset-created-event:
105                     exclude-drafts: 'false'
106                     exclude-trivial-rebase: 'false'
107                     exclude-no-code-change: 'false'
108                 - draft-published-event
109                 - comment-added-contains-event:
110                     comment-contains-value: 'recheck'
111                 - comment-added-contains-event:
112                     comment-contains-value: 'reverify'
113             projects:
114               - project-compare-type: 'ANT'
115                 project-pattern: 'genesis'
116                 branches:
117                   - branch-compare-type: 'ANT'
118                     branch-pattern: '**/master'
119
120     builders:
121         - shell: |
122             hostname
123             whoami
124             docker --version
125             cd fuel-build/docker
126             pwd
127             echo foo
128             make clean || true
129             make
130             echo "what tests can we run here?"
131
132 - job-template:
133     name: 'genesis-merge'
134
135     # builder-merge job to run JJB update
136     #
137     # This job's purpose is to update all the JJB
138
139     project-type: freestyle
140     node: fuel
141
142     logrotate:
143         daysToKeep: 30
144         numToKeep: 40
145         artifactDaysToKeep: -1
146         artifactNumToKeep: 5
147
148     parameters:
149         - project-parameter:
150             project: '{project}'
151         - gerrit-parameter:
152             branch: 'master'
153
154     scm:
155         - gerrit-trigger-scm:
156             credentials-id: '{ssh-credentials}'
157             refspec: ''
158             choosing-strategy: 'default'
159
160     wrappers:
161         - ssh-agent-credentials:
162             user: '{ssh-credentials}'
163
164     triggers:
165         - gerrit:
166             trigger-on:
167                 - change-merged-event
168                 - comment-added-contains-event:
169                     comment-contains-value: 'remerge'
170             projects:
171               - project-compare-type: 'ANT'
172                 project-pattern: 'genesis'
173                 branches:
174                     - branch-compare-type: 'ANT'
175                       branch-pattern: '**/master'
176
177     builders:
178         - shell: |
179             hostname
180             whoami
181             docker --version
182             cd fuel-build/docker
183             pwd
184             echo foo
185             make clean || true
186             make
187             cd ..
188             echo foo
189             make clean || true
190             make all
191
192 - job-template:
193     name: genesis-foreman-daily-master
194
195     project-type: freestyle
196
197     disabled: true
198
199     node: foreman
200
201     parameters:
202         - string:
203             name: INSTALLER
204             default: foreman
205             description: "Installer to use."
206         - string:
207             name: GERRIT_BRANCH
208             default: origin/master
209             description: "Branch to build, deploy and test."
210         - string:
211             name: GERRIT_REFSPEC
212             default: refs/heads/master
213             description: "Refspec to retrieve."
214
215     scm:
216         - git:
217             skip-tag: true
218             url: https://gerrit.opnfv.org/gerrit/genesis
219             branches:
220                 - $GERRIT_BRANCH
221             refspec: $GERRIT_REFSPEC
222
223     triggers:
224         - pollscm: '@midnight'
225
226     logrotate:
227         daysToKeep: 30
228         numToKeep: 10
229         artifactDaysToKeep: -1
230         artifactNumToKeep: -1
231
232     builders:
233         - trigger-builds:
234             - project: genesis-build
235               current-parameters: true
236               predefined-parameters: GERRIT_BRANCH=$GIT_COMMIT
237               same-node: true
238               block: true
239             - project: genesis-deploy
240               current-parameters: true
241               predefined-parameters: GERRIT_BRANCH=$GIT_COMMIT
242               same-node: true
243               block: true
244             - project: genesis-test
245               current-parameters: true
246               predefined-parameters: GERRIT_BRANCH=$GIT_COMMIT
247               same-node: true
248               block: true
249 - job-template:
250     name: genesis-fuel-daily-master
251
252     project-type: freestyle
253
254     disabled: false
255
256     node: fuel
257
258     parameters:
259         - string:
260             name: INSTALLER
261             default: fuel
262             description: "Installer to use."
263         - string:
264             name: GERRIT_BRANCH
265             default: origin/master
266             description: "Branch to build, deploy and test."
267         - string:
268             name: GERRIT_REFSPEC
269             default: refs/heads/master
270             description: "Refspec to retrieve."
271
272     scm:
273         - git:
274             skip-tag: true
275             url: https://gerrit.opnfv.org/gerrit/genesis
276             branches:
277                 - $GERRIT_BRANCH
278             refspec: $GERRIT_REFSPEC
279
280     triggers:
281         - pollscm: '@midnight'
282
283     logrotate:
284         daysToKeep: 30
285         numToKeep: 10
286         artifactDaysToKeep: -1
287         artifactNumToKeep: -1
288
289     builders:
290         - trigger-builds:
291             - project: genesis-build
292               current-parameters: true
293               predefined-parameters: GERRIT_BRANCH=$GIT_COMMIT
294               same-node: false
295               block: true
296             - project: genesis-deploy
297               current-parameters: true
298               predefined-parameters: GERRIT_BRANCH=$GIT_COMMIT
299               same-node: false
300               block: true
301             - project: genesis-test
302               current-parameters: true
303               predefined-parameters: GERRIT_BRANCH=$GIT_COMMIT
304               same-node: false
305               block: true
306 - job-template:
307     name: genesis-opensteak-daily-master
308
309     project-type: freestyle
310
311     disabled: true
312
313     node: opensteak
314
315     parameters:
316         - string:
317             name: INSTALLER
318             default: opensteak
319             description: "Installer to use."
320         - string:
321             name: GERRIT_BRANCH
322             default: origin/master
323             description: "Branch to build, deploy and test."
324         - string:
325             name: GERRIT_REFSPEC
326             default: refs/heads/master
327             description: "Refspec to retrieve."
328
329     scm:
330         - git:
331             skip-tag: true
332             url: https://gerrit.opnfv.org/gerrit/genesis
333             branches:
334                 - $GERRIT_BRANCH
335             refspec: $GERRIT_REFSPEC
336
337     triggers:
338         - pollscm: '@midnight'
339
340     logrotate:
341         daysToKeep: 30
342         numToKeep: 10
343         artifactDaysToKeep: -1
344         artifactNumToKeep: -1
345
346     builders:
347         - trigger-builds:
348             - project: genesis-build
349               current-parameters: true
350               predefined-parameters: GERRIT_BRANCH=$GIT_COMMIT
351               same-node: true
352               block: true
353             - project: genesis-deploy
354               current-parameters: true
355               predefined-parameters: GERRIT_BRANCH=$GIT_COMMIT
356               same-node: true
357               block: true
358             - project: genesis-test
359               current-parameters: true
360               predefined-parameters: GERRIT_BRANCH=$GIT_COMMIT
361               same-node: true
362               block: true
363
364 - job-template:
365     name: genesis-build
366
367     node: ericsson-build
368
369     project-type: freestyle
370
371     disabled: false
372
373     logrotate:
374         daysToKeep: 30
375         numToKeep: 10
376         artifactDaysToKeep: -1
377         artifactNumToKeep: -1
378
379     parameters:
380         - string:
381             name: INSTALLER
382             description: "Installer to use. Mandatory parameter."
383         - string:
384             name: GERRIT_BRANCH
385             default: master
386             description: "Branch to build, deploy and test."
387         - string:
388             name: GERRIT_REFSPEC
389             default: refs/heads/master
390             description: "Refspec to retrieve."
391
392     scm:
393         - git:
394             skip-tag: true
395             url: https://gerrit.opnfv.org/gerrit/genesis
396             branches:
397                 - $GERRIT_BRANCH
398             refspec: $GERRIT_REFSPEC
399
400     builders:
401         - shell: |
402             #!/bin/bash
403
404             set -o errexit
405             set -o nounset
406             set -o pipefail
407
408             hostname
409             whoami
410             docker --version
411             cd $WORKSPACE/fuel-build/docker
412             pwd
413             echo foo
414             make clean || true
415             make
416             cd ..
417             echo foo
418             make clean || true
419             make all
420
421 - job-template:
422     name: genesis-deploy
423
424     node: ericsson-build
425
426     project-type: freestyle
427
428     disabled: false
429
430     logrotate:
431         daysToKeep: 30
432         numToKeep: 10
433         artifactDaysToKeep: -1
434         artifactNumToKeep: -1
435
436     parameters:
437         - string:
438             name: INSTALLER
439             description: "Installer to use. Mandatory parameter."
440         - string:
441             name: GERRIT_BRANCH
442             default: master
443             description: "Branch to build, deploy and test."
444         - string:
445             name: GERRIT_REFSPEC
446             default: refs/heads/master
447             description: "Refspec to retrieve."
448
449     scm:
450         - git:
451             skip-tag: true
452             url: https://gerrit.opnfv.org/gerrit/genesis
453             branches:
454                 - $GERRIT_BRANCH
455             refspec: $GERRIT_REFSPEC
456
457     builders:
458         - shell: |
459             #!/bin/bash
460
461             set -o errexit
462             set -o nounset
463             set -o pipefail
464
465             echo cd $WORKSPACE/$INSTALLER/ci
466             echo ./build.sh
467
468 - job-template:
469     name: genesis-test
470
471     node: ericsson-build
472
473     project-type: freestyle
474
475     disabled: false
476
477     logrotate:
478         daysToKeep: 30
479         numToKeep: 10
480         artifactDaysToKeep: -1
481         artifactNumToKeep: -1
482
483     parameters:
484         - string:
485             name: INSTALLER
486             description: "Installer to use. Mandatory parameter."
487         - string:
488             name: GERRIT_BRANCH
489             default: master
490             description: "Branch to build, deploy and test."
491         - string:
492             name: GERRIT_REFSPEC
493             default: refs/heads/master
494             description: "Refspec to retrieve."
495
496     scm:
497         - git:
498             skip-tag: true
499             url: https://gerrit.opnfv.org/gerrit/genesis
500             branches:
501                 - $GERRIT_BRANCH
502             refspec: $GERRIT_REFSPEC
503
504     builders:
505         - shell: |
506             #!/bin/bash
507
508             set -o errexit
509             set -o nounset
510             set -o pipefail
511
512             echo cd $WORKSPACE/$INSTALLER/ci
513             echo ./test.sh