Update automated project templates
[releng/builder.git] / jjb / usc / usc.yaml
1 # REMOVE THIS LINE IF YOU WANT TO CUSTOMIZE ANYTHING BELOW
2 # Otherwise this file will be automatically overwritten by the template
3 # autobuilder.
4
5 # ODL Releng build templates
6 - project:
7     name: usc
8     jobs:
9         - 'usc-verify-{stream}'
10         - 'usc-merge-{stream}'
11         - 'usc-daily-{stream}'
12         - 'usc-distribution-{stream}'
13         - 'usc-integration-{stream}'
14         - 'usc-sonar'
15         - 'usc-clm-{stream}'
16
17
18     # stream:    release stream (eg. stable-lithium or beryllium)
19     # branch:    git branch (eg. stable/lithium or master)
20     stream:
21         - beryllium:
22             branch: 'master'
23             jdk: openjdk7
24             jdks:
25                 - openjdk7
26                 - openjdk8
27         - stable-lithium:
28             branch: 'stable/lithium'
29             jdk: openjdk7
30             jdks:
31                 - openjdk7
32                 - openjdk8
33
34     project: 'usc'
35
36 # For the Job templates below replace instances of:
37 # PROJECT_SHORTNAME with your project name (eg. circuitsw)
38 # PROJECT_PATH with your project name (eg. ofextensions/circuitsw)
39 # MAVEN_GOALS with your maven goals to build
40 # MAVEN_OPTS with your maven options to build
41
42 - job-template:
43     name: 'usc-verify-{stream}'
44
45     # Job template for ODL verify jobs
46     #
47     # The purpose of this job template is to setup a ODL verify job
48     #
49     # Required Variables:
50     #     stream:    release stream (eg. stable-lithium or beryllium)
51     #     branch:    git branch (eg. stable/lithium or master)
52
53     project-type: matrix
54     node: matrix_master
55     concurrent: true
56
57     axes:
58         - axis:
59             type: slave
60             name: nodes
61             values:
62                 - dynamic_verify
63         - axis:
64             type: jdk
65             values: '{obj:jdks}'
66
67     logrotate:
68         daysToKeep: '{build-days-to-keep}'
69         numToKeep: '{build-num-to-keep}'
70         artifactDaysToKeep: '{build-artifact-days-to-keep}'
71         artifactNumToKeep: '{build-artifact-num-to-keep}'
72
73     parameters:
74         - project-parameter:
75             project: '{project}'
76         - gerrit-parameter:
77             branch: '{branch}'
78
79     scm:
80         - gerrit-trigger-scm:
81             credentials-id: '{ssh-credentials}'
82             refspec: '$GERRIT_REFSPEC'
83             choosing-strategy: 'gerrit'
84
85     wrappers:
86         - build-timeout
87         - ssh-agent-credentials:
88             users:
89                 - '{ssh-credentials}'
90
91     triggers:
92         - gerrit-trigger-patch-submitted:
93             name: 'usc'
94             branch: '{branch}'
95
96     builders:
97         - wipe-org-opendaylight-repo
98         - jacoco-nojava-workaround
99         - provide-maven-settings:
100             global-settings-file: '{odl-global-settings}'
101             settings-file: '{usc-settings}'
102         - maven-target:
103             maven-version: '{mvn33}'
104             pom: 'pom.xml'
105             goals: 'clean install -V -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r  -Dstream={stream}'
106             java-opts:
107                 - '-Xmx1024m -XX:MaxPermSize=256m'
108             settings: '{usc-settings}'
109             global-settings: '{odl-global-settings}'
110
111     publishers:
112         - findbugs
113         - email-notification:
114             email-prefix: '[usc]'
115         - jacoco-report
116
117 - job-template:
118     name: 'usc-merge-{stream}'
119
120     # Job template for ODL merge jobs
121     #
122     # The purpose of this job template is to setup a ODL merge job
123     # and deploy artifacts to Nexus.
124     #
125     # Required Variables:
126     #     stream:    release stream (eg. stable-lithium or beryllium)
127     #     branch:    git branch (eg. stable/lithium or master)
128
129     project-type: maven
130     node: dynamic_merge
131     jdk: '{jdk}'
132
133     logrotate:
134         daysToKeep: '{build-days-to-keep}'
135         numToKeep: '{build-num-to-keep}'
136         artifactDaysToKeep: '{build-artifact-days-to-keep}'
137         artifactNumToKeep: '{build-artifact-num-to-keep}'
138
139     parameters:
140         - project-parameter:
141             project: '{project}'
142
143     scm:
144         - gerrit-trigger-scm:
145             credentials-id: '{ssh-credentials}'
146             refspec: ''
147             choosing-strategy: 'default'
148
149     wrappers:
150         - build-timeout
151         - ssh-agent-credentials:
152             users:
153                 - '{ssh-credentials}'
154
155     triggers:
156         - gerrit-trigger-patch-merged:
157             name: 'usc'
158             branch: '{branch}'
159
160     prebuilders:
161         - wipe-org-opendaylight-repo
162         - jacoco-nojava-workaround
163         - provide-maven-settings:
164             global-settings-file: '{odl-global-settings}'
165             settings-file: '{usc-settings}'
166
167     maven:
168         maven-name: '{mvn33}'
169         root-pom: 'pom.xml'
170         goals: 'clean install -V -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r  -Dmerge -Dstream={stream}'
171         maven-opts: '-Xmx1024m -XX:MaxPermSize=256m'
172         settings: '{usc-settings}'
173         global-settings: '{odl-global-settings}'
174         post-step-run-condition: UNSTABLE
175
176     postbuilders:
177         - conditional-step:
178             condition-kind: file-exists
179             condition-filename: deploy-site.xml
180             condition-basedir: workspace
181
182             # The strategy here is intentional to run Maven site:deploy twice
183             # once using regular pom.xml to produce a staged-site which is
184             # then used by deploy-site.xml to push to Nexus. This is a
185             # workaround to Maven Site's default linking code which creates
186             # incorrect URLs for sites due to auto-detection assuming your
187             # project is configured in a certain way which ODL is not.
188             steps:
189             - maven-target:
190                 maven-version: '{mvn33}'
191                 pom: pom.xml
192                 goals: 'site:deploy -Dstream={stream}'
193                 java-opts:
194                     - '-Xmx2g'
195                 settings: '{usc-settings}'
196                 global-settings: '{odl-global-settings}'
197             - maven-target:
198                 maven-version: '{mvn33}'
199                 pom: deploy-site.xml
200                 goals: 'site:deploy -Dstream={stream}'
201                 java-opts:
202                     - '-Xmx2g'
203                 settings: '{usc-settings}'
204                 global-settings: '{odl-global-settings}'
205
206     reporters:
207         - findbugs
208
209     publishers:
210         - email-notification:
211             email-prefix: '[usc]'
212         - maven-deploy:
213             id: ''
214             unique-version: true
215             deploy-unstable: false
216         - jacoco-report
217
218 - job-template:
219     name: 'usc-daily-{stream}'
220
221     # Job template for daily builders
222     #
223     # The purpose of this job template is to setup a daily/nightly
224     # builder and pushes to Sonar analysis.
225     #
226     # Required Variables:
227     #     stream:    release stream (eg. stable-lithium or beryllium)
228     #     branch:    git branch (eg. stable/lithium or master)
229
230     project-type: maven
231     node: dynamic_verify
232     jdk: '{jdk}'
233
234     logrotate:
235         daysToKeep: '{build-days-to-keep}'
236         numToKeep: '{build-num-to-keep}'
237         artifactDaysToKeep: '{build-artifact-days-to-keep}'
238         artifactNumToKeep: '{build-artifact-num-to-keep}'
239
240     parameters:
241         - project-parameter:
242             project: '{project}'
243
244     scm:
245         - git-scm:
246             credentials-id: '{ssh-credentials}'
247             refspec: ''
248             branch: '{branch}'
249
250     wrappers:
251         - build-timeout
252         - ssh-agent-credentials:
253             users:
254                 - '{ssh-credentials}'
255
256     triggers:
257         - timed: 'H H * * *'
258
259     prebuilders:
260         - wipe-org-opendaylight-repo
261         - jacoco-nojava-workaround
262         - provide-maven-settings:
263             global-settings-file: '{odl-global-settings}'
264             settings-file: '{usc-settings}'
265
266     maven:
267         maven-name: '{mvn33}'
268         root-pom: 'pom.xml'
269         goals: 'clean install -V -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r '
270         maven-opts: '-Xmx1024m -XX:MaxPermSize=256m'
271         settings: '{usc-settings}'
272         global-settings: '{odl-global-settings}'
273
274     reporters:
275         - findbugs
276
277     publishers:
278         - email-notification:
279             email-prefix: '[usc]'
280         - jacoco-report
281
282 - job-template:
283     name: 'usc-distribution-{stream}'
284
285     # Required variables:
286     #     stream:    release stream (eg. stable-lithium or beryllium)
287     #     branch:    git branch (eg. stable/lithium or master)
288
289     project-type: maven
290     node: dynamic_merge
291     jdk: '{jdk}'
292
293     logrotate:
294         daysToKeep: '{build-days-to-keep}'
295         numToKeep: '{build-num-to-keep}'
296         artifactDaysToKeep: '{build-artifact-days-to-keep}'
297         artifactNumToKeep: '{build-artifact-num-to-keep}'
298
299     parameters:
300         - project-parameter:
301             project: 'integration'
302
303     scm:
304         - git-scm:
305             credentials-id: '{ssh-credentials}'
306             refspec: ''
307             branch: '{branch}'
308
309     wrappers:
310         - build-timeout
311         - ssh-agent-credentials:
312             users:
313                 - '{ssh-credentials}'
314
315     triggers:
316         - reverse:
317             jobs: '{project}-merge-{stream}'
318             result: 'success'
319
320     prebuilders:
321         - wipe-org-opendaylight-repo
322         - provide-maven-settings:
323             global-settings-file: '{odl-global-settings}'
324             settings-file: '{usc-settings}'
325
326     maven:
327         maven-name: '{mvn33}'
328         root-pom: 'pom.xml'
329         goals: '-Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r clean install'
330         maven-opts: '-Xmx1024m -XX:MaxPermSize=256m -Dmaven.compile.fork=true'
331         settings: '{integration-settings}'
332         global-settings: '{odl-global-settings}'
333
334     publishers:
335         - email-notification:
336             email-prefix: '[{project}]'
337         - maven-deploy:
338             id: ''
339             unique-version: true
340             deploy-unstable: false
341
342 - job-template:
343     name: 'usc-integration-{stream}'
344     disabled: false
345
346     # Job template for ODL integration verify jobs
347     #
348     # This is similar to a normal verify job, but it runs
349     # when a project that's a dependency of your project
350     # is successfully built.
351     #
352     # Required Variables:
353     #     stream:    release stream (eg. stable-lithium or beryllium)
354     #     branch:    git branch (eg. stable/lithium or master)
355
356     project-type: maven
357     node: dynamic_merge
358     jdk: '{jdk}'
359
360     logrotate:
361         daysToKeep: '{build-days-to-keep}'
362         numToKeep: '{build-num-to-keep}'
363         artifactDaysToKeep: '{build-artifact-days-to-keep}'
364         artifactNumToKeep: '{build-artifact-num-to-keep}'
365
366     parameters:
367         - project-parameter:
368             project: '{project}'
369
370     scm:
371         - git-scm:
372             credentials-id: '{ssh-credentials}'
373             refspec: ''
374             branch: '{branch}'
375
376     wrappers:
377         - build-timeout
378         - ssh-agent-credentials:
379             users:
380                 - '{ssh-credentials}'
381
382     triggers:
383         - reverse:
384             jobs: 'controller-merge-{stream},yangtools-merge-{stream},odlparent-merge-{stream}'
385             result: 'success'
386
387     prebuilders:
388         - wipe-org-opendaylight-repo
389         - jacoco-nojava-workaround
390         - provide-maven-settings:
391             global-settings-file: '{odl-global-settings}'
392             settings-file: '{usc-settings}'
393
394     maven:
395         maven-name: '{mvn33}'
396         root-pom: 'pom.xml'
397         goals: 'clean install -V -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r '
398         maven-opts: '-Xmx1024m -XX:MaxPermSize=256m'
399         settings: '{usc-settings}'
400         global-settings: '{odl-global-settings}'
401
402     reporters:
403         - findbugs
404
405     publishers:
406         - email-notification:
407             email-prefix: '[usc] [controller] [yangtools] [odlparent]'
408         - jacoco-report
409
410 - job-template:
411     name: 'usc-sonar'
412
413     project-type: maven
414     node: dynamic_verify
415     jdk: 'openjdk7'
416
417     logrotate:
418         daysToKeep: '7'
419         numToKeep: '10'
420         artifactDaysToKeep: '1'
421         artifactNumToKeep: '1'
422
423     parameters:
424         - project-parameter:
425             project: '{project}'
426
427     scm:
428         - git-scm:
429             credentials-id: '{ssh-credentials}'
430             refspec: ''
431             branch: 'master'
432
433     wrappers:
434         - build-timeout
435         - ssh-agent-credentials:
436             users:
437                 - '{ssh-credentials}'
438
439     triggers:
440         - timed: 'H H * * *'
441         - gerrit-trigger-patch-sonar:
442             name: 'usc'
443
444     prebuilders:
445         - wipe-org-opendaylight-repo
446         - jacoco-nojava-workaround
447         - provide-maven-settings:
448             global-settings-file: '{odl-global-settings}'
449             settings-file: '{usc-settings}'
450
451     maven:
452         maven-name: '{mvn33}'
453         root-pom: 'pom.xml'
454         goals: 'clean install -V -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r  -Dsonar'
455         maven-opts: '-Xmx1024m -XX:MaxPermSize=256m'
456         settings: '{usc-settings}'
457         global-settings: '{odl-global-settings}'
458
459     reporters:
460         - findbugs
461
462     publishers:
463         - sonar:
464             language: 'java'
465             maven-opts: '-Xmx6144m -XX:MaxPermSize=1024m'
466         - email-notification:
467             email-prefix: '[usc]'
468         - jacoco-report
469
470 - job-template:
471     name: 'usc-clm-{stream}'
472
473     project-type: maven
474     node: dynamic_verify
475     jdk: '{jdk}'
476
477     logrotate:
478         daysToKeep: '{build-days-to-keep}'
479         numToKeep: '{build-num-to-keep}'
480         artifactDaysToKeep: '{build-artifact-days-to-keep}'
481         artifactNumToKeep: '{build-artifact-num-to-keep}'
482
483     parameters:
484         - project-parameter:
485             project: '{project}'
486
487     scm:
488         - git-scm:
489             credentials-id: '{ssh-credentials}'
490             refspec: ''
491             branch: '{branch}'
492
493     wrappers:
494         - build-timeout
495         - ssh-agent-credentials:
496             users:
497                 - '{ssh-credentials}'
498
499     triggers:
500         - timed: '@weekly'
501
502     prebuilders:
503         - wipe-org-opendaylight-repo
504         - provide-maven-settings:
505             global-settings-file: '{odl-global-settings}'
506             settings-file: '{usc-settings}'
507
508     maven:
509         maven-name: '{mvn33}'
510         root-pom: 'pom.xml'
511         goals: 'com.sonatype.clm:clm-maven-plugin:index -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r'
512         maven-opts: '-Xmx4096m -XX:MaxPermSize=512m'
513         settings: '{usc-settings}'
514         global-settings: '{odl-global-settings}'
515
516     postbuilders:
517         - check-clm:
518             application-name: usc
519
520     publishers:
521         - email-notification:
522             email-prefix: '[usc]'
523