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