Merge "move network id to local jenkins configuration managed files"
[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         # Attempt to clear up stacks every 30 mins in case we have orphaned stacks
313         - timed: '0,30 * * * *'
314
315     builders:
316         - shell: !include-raw-escape: opendaylight-infra-cleanup-stale-stacks.sh
317
318     publishers:
319         - email-notification:
320             email-recipients: '{email-recipients}'
321             email-prefix: '[releng]'
322         - opendaylight-infra-shiplogs:
323             maven-version: 'mvn33'
324
325 - job-template:
326     name: 'builder-verify-packer'
327     project-type: freestyle
328     node: centos7-java-builder-2c-4g
329     concurrent: true
330
331     properties:
332         - opendaylight-infra-properties:
333             build-days-to-keep: 14
334
335     parameters:
336         - opendaylight-infra-parameters:
337             project: '{project}'
338             branch: '{branch}'
339             refspec: 'refs/heads/{branch}'
340             artifacts: '{archive-artifacts}'
341
342     scm:
343         - gerrit-trigger-scm:
344             refspec: '$GERRIT_REFSPEC'
345             choosing-strategy: 'gerrit'
346
347     wrappers:
348         - opendaylight-infra-wrappers:
349             build-timeout: '{build-timeout}'
350
351     triggers:
352         - gerrit-trigger-patch-submitted:
353             server: '{server-name}'
354             project: '{project}'
355             branch: '{branch}'
356             files: 'packer/**'
357
358     builders:
359         - packer-validate:
360
361     publishers:
362         - email-notification:
363             email-recipients: '{email-recipients}'
364             email-prefix: '[{project}]'
365         - opendaylight-infra-shiplogs:
366             maven-version: 'mvn33'
367
368 - job-template:
369     name: 'builder-merge-packer-{platforms}-{templates}'
370     project-type: freestyle
371     node: centos7-java-builder-2c-4g
372     concurrent: true
373
374     properties:
375         - opendaylight-infra-properties:
376             build-days-to-keep: 14
377
378     parameters:
379         - opendaylight-infra-parameters:
380             project: '{project}'
381             branch: '{branch}'
382             refspec: 'refs/heads/{branch}'
383             artifacts: '{archive-artifacts}'
384
385     scm:
386         - gerrit-trigger-scm:
387             refspec: ''
388             choosing-strategy: 'default'
389
390     wrappers:
391         - opendaylight-infra-wrappers:
392             build-timeout: '{build-timeout}'
393
394     triggers:
395         - timed: '00 10 1 * *'
396         - gerrit:
397             server-name: '{server-name}'
398             trigger-on:
399                 - change-merged-event
400                 - comment-added-contains-event:
401                     comment-contains-value: 'remerge'
402             projects:
403               - project-compare-type: 'ANT'
404                 project-pattern: 'releng/builder'
405                 branches:
406                     - branch-compare-type: 'ANT'
407                       branch-pattern: '**/{branch}'
408                 file-paths:
409                     - compare-type: ANT
410                       pattern: 'packer/**'
411
412     builders:
413         - packer-validate:
414         - packer-build:
415             platform: '{platforms}'
416             template: '{templates}'
417
418     publishers:
419         - email-notification:
420             email-recipients: '{email-recipients}'
421             email-prefix: '[{project}]'
422         - opendaylight-infra-shiplogs:
423             maven-version: 'mvn33'
424
425 - job-template:
426     name: 'builder-update-csit-tests'
427     node: centos7-java-builder-2c-8g
428
429     # builder-update-csit-tests job
430     #
431     # This job's purpose is to update csit
432     # tests to run in integration-distribution-test-{stream}
433     # by updating releng-defaults variables: csit-list-carbon,
434     # csit-list-boron, csit-list-beryllium
435
436     project-type: freestyle
437
438     properties:
439         - opendaylight-infra-properties:
440             build-days-to-keep: 14
441
442     parameters:
443         - opendaylight-infra-parameters:
444             project: '{project}'
445             branch: '{branch}'
446             refspec: 'refs/heads/{branch}'
447             artifacts: '{archive-artifacts}'
448
449     scm:
450         - gerrit-trigger-scm:
451             refspec: ''
452             choosing-strategy: 'default'
453
454     wrappers:
455         - opendaylight-infra-wrappers:
456             build-timeout: '{build-timeout}'
457
458     triggers:
459         - reverse:
460                jobs: 'builder-merge'
461
462     builders:
463         - shell: |
464             git checkout -b auto-update-csit-jobs
465         - integration-list-jobs:
466             blacklist: '{csit-list-blacklist}'
467             search_string: "csit"
468             stream: "carbon"
469             jobs-filename: "csit_jobs_carbon.lst"
470         - integration-list-jobs:
471             blacklist: '{csit-list-blacklist}'
472             search_string: "csit"
473             stream: "boron"
474             jobs-filename: "csit_jobs_boron.lst"
475         - integration-list-jobs:
476             blacklist: '{csit-list-blacklist}'
477             search_string: "csit"
478             stream: "beryllium"
479             jobs-filename: "csit_jobs_beryllium.lst"
480         - integration-replace-block-text:
481             starting-regex: "'csit-list-carbon: >'"
482             ending-regex: "'csit-list-boron: >'"
483             file-with-changes-to-insert: "'csit_jobs_carbon.lst'"
484             file-to-change: "'jjb/releng-defaults.yaml'"
485         - integration-replace-block-text:
486             starting-regex: "'csit-list-boron: >'"
487             ending-regex: "'csit-list-beryllium: >'"
488             file-with-changes-to-insert: "'csit_jobs_boron.lst'"
489             file-to-change: "'jjb/releng-defaults.yaml'"
490         - integration-replace-block-text:
491             starting-regex: "'csit-list-beryllium: >'"
492             ending-regex: "'# CSIT TESTS END SED MARKER'"
493             file-with-changes-to-insert: "'csit_jobs_beryllium.lst'"
494             file-to-change: "'jjb/releng-defaults.yaml'"
495         - shell: |
496             git status
497             git add jjb/releng-defaults.yaml
498         - opendaylight-infra-push-gerrit-patch:
499             project: "releng/builder"
500             gerrit-topic: "auto-update-csit-jobs"
501             gerrit-commit-message: "Auto Update CSIT Jobs to run"
502
503     publishers:
504         - email-notification:
505             email-recipients: '{email-recipients}'
506             email-prefix: '[releng]'
507         - opendaylight-infra-shiplogs:
508             maven-version: 'mvn33'