Merge "De-template project-name in JJB"
[releng/builder.git] / jjb / releng-jobs.yaml
1 - project:
2     name: builder-jobs
3     jobs:
4         - 'builder-verify-jjb'
5         - 'builder-verify-python'
6         - 'builder-merge'
7         - 'builder-weekly'
8         - 'builder-check-poms'
9         - 'builder-verify-packer'
10         - 'builder-merge-packer-{platforms}-{templates}'
11         - 'builder-delete-stale-stacks'
12         - 'builder-update-csit-tests'
13
14     platforms:
15         - centos
16         - ubuntu-14.04
17
18     templates:
19         - devstack
20         - devstack-pre-pip-mitaka
21         - devstack-pre-pip-newton
22         - docker
23         - gbp
24         - java-builder
25         - mininet
26         - mininet-ovs-2.3
27         - mininet-ovs-2.5
28         - robot
29
30     exclude:
31         - platforms: centos
32           templates: gbp
33         - platforms: centos
34           templates: mininet
35         - platforms: centos
36           templates: mininet-ovs-2.3
37         - platforms: centos
38           templates: mininet-ovs-2.5
39         - platforms: ubuntu-14.04
40           templates: java-builder
41         - platforms: ubuntu-14.04
42           templates: robot
43         - platforms: ubuntu-14.04
44           templates: devstack-pre-pip-mitaka
45         - platforms: ubuntu-14.04
46           templates: devstack-pre-pip-newton
47
48     project-type: freestyle
49     archive-artifacts: '**/*.log'
50     build-timeout: '60'
51     # The following two values are only specified here
52     # so that code blocks look similar to other projects.
53     project: 'releng/builder'
54     branch: 'master'
55
56 - job-template:
57     name: builder-verify-jjb
58     node: jjbuilder
59
60     project-type: freestyle
61
62     properties:
63         - opendaylight-infra-properties:
64             build-days-to-keep: 14
65
66     parameters:
67         - opendaylight-infra-parameters:
68             project: '{project}'
69             branch: '{branch}'
70             refspec: 'refs/heads/{branch}'
71             artifacts: '{archive-artifacts}'
72
73     scm:
74         - gerrit-trigger-scm:
75             refspec: '$GERRIT_REFSPEC'
76             choosing-strategy: 'gerrit'
77
78     wrappers:
79         - opendaylight-infra-wrappers:
80             build-timeout: '{build-timeout}'
81
82     triggers:
83         - gerrit-trigger-patch-submitted:
84             server: '{server-name}'
85             project: '{project}'
86             branch: '{branch}'
87             files: 'jjb/**'
88
89     builders:
90         - shell: |
91             pip freeze
92             jenkins-jobs -l DEBUG test --recursive -o archives/job_output jjb/
93             gzip archives/job_output/*
94
95         - releng-check-unicode
96         - verify-gpg-signature
97
98     publishers:
99         - email-notification:
100             email-recipients: '{email-recipients}'
101             email-prefix: '[releng]'
102         - opendaylight-infra-shiplogs:
103             maven-version: 'mvn33'
104
105 # FIXME: Migrate to {project-name}-verify-python-{stream} or delete this entirely,
106 #        as there are zero python files (aside docs/conf.py) in releng/builder.
107 - job-template:
108     name: builder-verify-python
109     node: centos7-java-builder-2c-4g
110
111     project-type: freestyle
112
113     properties:
114         - opendaylight-infra-properties:
115             build-days-to-keep: 14
116
117     parameters:
118         - opendaylight-infra-parameters:
119             project: '{project}'
120             branch: '{branch}'
121             refspec: 'refs/heads/{branch}'
122             artifacts: '{archive-artifacts}'
123
124     scm:
125         - gerrit-trigger-scm:
126             refspec: '$GERRIT_REFSPEC'
127             choosing-strategy: 'gerrit'
128
129     wrappers:
130         - opendaylight-infra-wrappers:
131             build-timeout: '{build-timeout}'
132
133     triggers:
134         - gerrit-trigger-patch-submitted:
135             server: '{server-name}'
136             project: '{project}'
137             branch: '{branch}'
138             files: 'scripts/**'
139
140     builders:
141         - verify-gpg-signature
142         - shell: |
143             virtualenv $WORKSPACE/venv
144             source $WORKSPACE/venv/bin/activate
145             pip install --upgrade pip
146             pip freeze
147             pip install flake8
148             flake8 scripts/
149
150     publishers:
151         - email-notification:
152             email-recipients: '{email-recipients}'
153             email-prefix: '[releng]'
154         - opendaylight-infra-shiplogs:
155             maven-version: 'mvn33'
156
157 - job-template:
158     name: 'builder-merge'
159     node: jjbuilder
160
161     # builder-merge job to run JJB update
162     #
163     # This job's purpose is to update all the JJB
164
165     project-type: freestyle
166
167     properties:
168         - opendaylight-infra-properties:
169             build-days-to-keep: 14
170
171     parameters:
172         - opendaylight-infra-parameters:
173             project: '{project}'
174             branch: '{branch}'
175             refspec: 'refs/heads/{branch}'
176             artifacts: '{archive-artifacts}'
177
178     scm:
179         - gerrit-trigger-scm:
180             refspec: ''
181             choosing-strategy: 'default'
182
183     wrappers:
184         - opendaylight-infra-wrappers:
185             build-timeout: '{build-timeout}'
186
187     triggers:
188         - gerrit:
189             server-name: '{server-name}'
190             trigger-on:
191                 - change-merged-event
192                 - comment-added-contains-event:
193                     comment-contains-value: 'remerge'
194             projects:
195               - project-compare-type: 'ANT'
196                 project-pattern: 'releng/builder'
197                 branches:
198                     - branch-compare-type: 'ANT'
199                       branch-pattern: '**/{branch}'
200                 file-paths:
201                     - compare-type: ANT
202                       pattern: jjb/**
203
204     builders:
205         - shell: |
206             pip freeze
207             jenkins-jobs --version
208             jenkins-jobs update --recursive --delete-old --workers 4 jjb/
209
210     publishers:
211         - email-notification:
212             email-recipients: '{email-recipients}'
213             email-prefix: '[releng]'
214         - opendaylight-infra-shiplogs:
215             maven-version: 'mvn33'
216
217 - job-template:
218     name: 'builder-weekly'
219     disabled: false
220     node: jjbuilder
221
222     # builder-weekly job to run JJB update weekly
223     #
224     # This job's purpose is to update all the JJB on a weekly (Sunday)
225     # basis with --flush-cache enabled to ensure jobs are okay
226
227     project-type: freestyle
228
229     properties:
230         - opendaylight-infra-properties:
231             build-days-to-keep: 14
232
233     parameters:
234         - opendaylight-infra-parameters:
235             project: '{project}'
236             branch: '{branch}'
237             refspec: 'refs/heads/{branch}'
238             artifacts: '{archive-artifacts}'
239
240     scm:
241         - git-scm:
242             branch: '{branch}'
243
244     wrappers:
245         - opendaylight-infra-wrappers:
246             build-timeout: '{build-timeout}'
247
248     triggers:
249         - timed: 'H H * * 0'
250
251     builders:
252         - shell: |
253             jenkins-jobs --flush-cache update --recursive --workers 4 jjb/
254
255     publishers:
256         - email-notification:
257             email-recipients: '{email-recipients}'
258             email-prefix: '[releng]'
259         - opendaylight-infra-shiplogs:
260             maven-version: 'mvn33'
261
262 - job-template:
263     name: builder-check-poms
264     node: centos7-java-builder-2c-4g
265
266     project-type: freestyle
267
268     properties:
269         - opendaylight-infra-properties:
270             build-days-to-keep: 14
271
272     parameters:
273         - opendaylight-infra-parameters:
274             project: '{project}'
275             branch: '{branch}'
276             refspec: 'refs/heads/{branch}'
277             artifacts: '{archive-artifacts}'
278
279     wrappers:
280         - opendaylight-infra-wrappers:
281             build-timeout: '{build-timeout}'
282
283     triggers:
284         - timed: 'H H * * 1'
285
286     builders:
287         - shell:
288             !include-raw-escape:
289                 - include-raw-check-poms.sh
290
291     publishers:
292         - email-notification:
293             email-recipients: '{email-recipients}'
294             email-prefix: '[releng]'
295         - opendaylight-infra-shiplogs:
296             maven-version: 'mvn33'
297
298 - job-template:
299     name: 'builder-delete-stale-stacks'
300     project-type: freestyle
301     node: centos7-java-builder-2c-4g
302
303     properties:
304         - opendaylight-infra-properties:
305             build-days-to-keep: 7
306
307     wrappers:
308         - opendaylight-infra-wrappers:
309             build-timeout: '{build-timeout}'
310
311     triggers:
312         - timed: 'H H/6 * * *'
313
314     builders:
315         - shell: !include-raw-escape: opendaylight-infra-cleanup-stale-stacks.sh
316
317     publishers:
318         - email-notification:
319             email-recipients: '{email-recipients}'
320             email-prefix: '[releng]'
321         - opendaylight-infra-shiplogs:
322             maven-version: 'mvn33'
323
324 - job-template:
325     name: 'builder-verify-packer'
326     project-type: freestyle
327     node: centos7-java-builder-2c-4g
328     concurrent: true
329
330     properties:
331         - opendaylight-infra-properties:
332             build-days-to-keep: 14
333
334     parameters:
335         - opendaylight-infra-parameters:
336             project: '{project}'
337             branch: '{branch}'
338             refspec: 'refs/heads/{branch}'
339             artifacts: '{archive-artifacts}'
340
341     scm:
342         - gerrit-trigger-scm:
343             refspec: '$GERRIT_REFSPEC'
344             choosing-strategy: 'gerrit'
345
346     wrappers:
347         - opendaylight-infra-wrappers:
348             build-timeout: '{build-timeout}'
349
350     triggers:
351         - gerrit-trigger-patch-submitted:
352             server: '{server-name}'
353             project: '{project}'
354             branch: '{branch}'
355             files: 'packer/**'
356
357     builders:
358         - packer-validate:
359
360     publishers:
361         - email-notification:
362             email-recipients: '{email-recipients}'
363             email-prefix: '[{project}]'
364         - opendaylight-infra-shiplogs:
365             maven-version: 'mvn33'
366
367 - job-template:
368     name: 'builder-merge-packer-{platforms}-{templates}'
369     project-type: freestyle
370     node: centos7-java-builder-2c-4g
371     concurrent: true
372
373     properties:
374         - opendaylight-infra-properties:
375             build-days-to-keep: 14
376
377     parameters:
378         - opendaylight-infra-parameters:
379             project: '{project}'
380             branch: '{branch}'
381             refspec: 'refs/heads/{branch}'
382             artifacts: '{archive-artifacts}'
383
384     scm:
385         - gerrit-trigger-scm:
386             refspec: ''
387             choosing-strategy: 'default'
388
389     wrappers:
390         - opendaylight-infra-wrappers:
391             build-timeout: '{build-timeout}'
392
393     triggers:
394         - timed: '00 10 1 * *'
395         - gerrit:
396             server-name: '{server-name}'
397             trigger-on:
398                 - change-merged-event
399                 - comment-added-contains-event:
400                     comment-contains-value: 'remerge'
401             projects:
402               - project-compare-type: 'ANT'
403                 project-pattern: 'releng/builder'
404                 branches:
405                     - branch-compare-type: 'ANT'
406                       branch-pattern: '**/{branch}'
407                 file-paths:
408                     - compare-type: ANT
409                       pattern: 'packer/**'
410
411     builders:
412         - packer-validate:
413         - packer-build:
414             platform: '{platforms}'
415             template: '{templates}'
416
417     publishers:
418         - email-notification:
419             email-recipients: '{email-recipients}'
420             email-prefix: '[{project}]'
421         - opendaylight-infra-shiplogs:
422             maven-version: 'mvn33'
423
424 - job-template:
425     name: 'builder-update-csit-tests'
426     node: centos7-java-builder-2c-8g
427
428     # builder-update-csit-tests job
429     #
430     # This job's purpose is to update csit
431     # tests to run in integration-distribution-test-{stream}
432     # by updating releng-defaults variables: csit-list-carbon,
433     # csit-list-boron, csit-list-beryllium
434
435     project-type: freestyle
436
437     properties:
438         - opendaylight-infra-properties:
439             build-days-to-keep: 14
440
441     parameters:
442         - opendaylight-infra-parameters:
443             project: '{project}'
444             branch: '{branch}'
445             refspec: 'refs/heads/{branch}'
446             artifacts: '{archive-artifacts}'
447
448     scm:
449         - gerrit-trigger-scm:
450             refspec: ''
451             choosing-strategy: 'default'
452
453     wrappers:
454         - opendaylight-infra-wrappers:
455             build-timeout: '{build-timeout}'
456
457     triggers:
458         - reverse:
459                jobs: 'builder-merge'
460
461     builders:
462         - shell: |
463             git checkout -b auto-update-csit-jobs
464         - integration-list-jobs:
465             blacklist: '{csit-list-blacklist}'
466             search_string: "csit"
467             stream: "carbon"
468             jobs-filename: "csit_jobs_carbon.lst"
469         - integration-list-jobs:
470             blacklist: '{csit-list-blacklist}'
471             search_string: "csit"
472             stream: "boron"
473             jobs-filename: "csit_jobs_boron.lst"
474         - integration-list-jobs:
475             blacklist: '{csit-list-blacklist}'
476             search_string: "csit"
477             stream: "beryllium"
478             jobs-filename: "csit_jobs_beryllium.lst"
479         - integration-replace-block-text:
480             starting-regex: "'csit-list-carbon: >'"
481             ending-regex: "'csit-list-boron: >'"
482             file-with-changes-to-insert: "'csit_jobs_carbon.lst'"
483             file-to-change: "'jjb/releng-defaults.yaml'"
484         - integration-replace-block-text:
485             starting-regex: "'csit-list-boron: >'"
486             ending-regex: "'csit-list-beryllium: >'"
487             file-with-changes-to-insert: "'csit_jobs_boron.lst'"
488             file-to-change: "'jjb/releng-defaults.yaml'"
489         - integration-replace-block-text:
490             starting-regex: "'csit-list-beryllium: >'"
491             ending-regex: "'# CSIT TESTS END SED MARKER'"
492             file-with-changes-to-insert: "'csit_jobs_beryllium.lst'"
493             file-to-change: "'jjb/releng-defaults.yaml'"
494         - shell: |
495             git status
496             git add jjb/releng-defaults.yaml
497         - opendaylight-infra-push-gerrit-patch:
498             project: "releng/builder"
499             gerrit-topic: "auto-update-csit-jobs"
500             gerrit-commit-message: "Auto Update CSIT Jobs to run"
501
502     publishers:
503         - email-notification:
504             email-recipients: '{email-recipients}'
505             email-prefix: '[releng]'
506         - opendaylight-infra-shiplogs:
507             maven-version: 'mvn33'