Convert validate-autorelease to be regular jjb template
[releng/builder.git] / jjb / releng-templates-java.yaml
1 - job-template:
2     # Template used for running CLM scans
3     # Arguements:
4     #   {name}         - Project Shortname
5     #   {project}      - Fully qualified project name
6     #   {mvn-settings} - Project maven settings file
7     #   {stream}
8     #   {jdk}
9     name: '{name}-clm-{stream}'
10
11     project-type: maven
12     node: dynamic_verify
13     jdk: '{jdk}'
14
15     logrotate:
16         daysToKeep: '{build-days-to-keep}'
17         numToKeep: '{build-num-to-keep}'
18
19     parameters:
20         - project-parameter:
21             project: '{project}'
22
23     scm:
24         - git-scm:
25             refspec: ''
26             branch: '{branch}'
27
28     wrappers:
29         - opendaylight-infra-wrappers:
30             build-timeout: '{build-timeout}'
31
32     triggers:
33         - timed: 'H H * * 6'
34
35     prebuilders:
36         - provide-maven-settings:
37             global-settings-file: 'odl-global-settings'
38             settings-file: '{mvn-settings}'
39
40     maven:
41         maven-name: '{mvn33}'
42         root-pom: 'pom.xml'
43         goals: 'clean install com.sonatype.clm:clm-maven-plugin:index -V -B -Djenkins -DskipTests=true -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r'
44         maven-opts: '-Xmx4096m -XX:MaxPermSize=512m'
45         settings: '{mvn-settings}'
46         settings-type: cfp
47         global-settings: 'odl-global-settings'
48         global-settings-type: cfp
49
50     postbuilders:
51         - shell: 'find . -regex ".*karaf/target" | xargs rm -rf'
52         - check-clm:
53             application-name: '{name}'
54
55     publishers:
56         - email-notification:
57             email-prefix: '[{name}]'
58         - archive-build:
59             maven-version: '{mvn33}'
60
61 - job-template:
62     name: '{name}-distribution-{stream}'
63
64     # Required variables:
65     #     stream:    release stream (eg. stable-lithium or beryllium)
66     #     branch:    git branch (eg. stable/lithium or master)
67
68     project-type: maven
69     node: dynamic_merge
70     jdk: '{jdk}'
71
72     logrotate:
73         daysToKeep: '{build-days-to-keep}'
74         numToKeep: '{build-num-to-keep}'
75         artifactDaysToKeep: '{build-artifact-days-to-keep}'
76         artifactNumToKeep: '{build-artifact-num-to-keep}'
77
78     parameters:
79         - project-parameter:
80             project: 'integration/distribution'
81
82     scm:
83         - git-scm:
84             refspec: ''
85             branch: '{branch}'
86
87     wrappers:
88         - opendaylight-infra-wrappers:
89             build-timeout: '{build-timeout}'
90
91     triggers:
92         - reverse:
93             jobs: '{project}-merge-{stream}'
94             result: 'success'
95
96     prebuilders:
97         - provide-maven-settings:
98             global-settings-file: 'odl-global-settings'
99             settings-file: '{mvn-settings}'
100
101     maven:
102         maven-name: '{mvn33}'
103         root-pom: 'pom.xml'
104         goals: 'clean install -V -B -Djenkins -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r'
105         maven-opts: '-Xmx1024m -XX:MaxPermSize=256m -Dmaven.compile.fork=true'
106         settings: 'integration-distribution-settings'
107         settings-type: cfp
108         global-settings: 'odl-global-settings'
109         global-settings-type: cfp
110
111     publishers:
112         - email-notification:
113             email-prefix: '[{project}]'
114         - maven-deploy:
115             id: ''
116             unique-version: true
117             deploy-unstable: false
118         - archive-build:
119             maven-version: '{mvn33}'
120
121 - job-template:
122     # Template: integration-patch-distribution-{stream}
123     # Goal: Build a patch and make sure the distribution can deploy with this change
124     # Operation: This job template builds a patch, creates a distribution containing
125     #            the patch, and triggers the distribution deploy test
126
127     name: '{name}-distribution-check-{stream}'
128     disabled: '{obj:disable_distribution_check}'
129
130     project-type: maven
131     node: dynamic_verify
132     concurrent: true
133     jdk: '{jdk}'
134
135     logrotate:
136         daysToKeep: '{build-days-to-keep}'
137         numToKeep: '{build-num-to-keep}'
138         artifactDaysToKeep: '{build-artifact-days-to-keep}'
139         artifactNumToKeep: '{build-artifact-num-to-keep}'
140
141     parameters:
142         - gerrit-parameters:
143             project: '{project}'
144             branch: '{branch}'
145             refspec: 'refs/heads/{branch}'
146         - project-parameter:
147             project: '{project}'
148         - integration-distribution-git-url
149
150     scm:
151         - integration-gerrit-scm:
152             basedir: '$GERRIT_PROJECT'
153             refspec: '$GERRIT_REFSPEC'
154             branch: '{branch}'
155         - integration-distribution-scm:
156             branch: '{branch}'
157
158     wrappers:
159         - opendaylight-infra-wrappers:
160             build-timeout: '{build-timeout}'
161
162     triggers:
163         - gerrit:
164             server-name: 'OpenDaylight'
165             trigger-on:
166                 - patchset-created-event:
167                     exclude-drafts: 'true'
168                     exclude-trivial-rebase: 'false'
169                     exclude-no-code-change: 'true'
170                 - draft-published-event
171                 - comment-added-contains-event:
172                     comment-contains-value: 'test-distribution'
173                 - comment-added-contains-event:
174                     comment-contains-value: 'reverify'
175                 - comment-added-contains-event:
176                     comment-contains-value: 'recheck'
177             projects:
178               - project-compare-type: 'ANT'
179                 project-pattern: '{name}'
180                 branches:
181                   - branch-compare-type: 'ANT'
182                     branch-pattern: '**/{branch}'
183             skip-vote:
184                 successful: false
185                 failed: false
186                 unstable: false
187                 notbuilt: false
188
189     prebuilders:
190         - maven-target:
191             maven-version: '{mvn33}'
192             pom: '$GERRIT_PROJECT/pom.xml'
193             goals: 'clean install -V -B -Djenkins -DskipTests -Dcheckstyle.skip=true -Dmaven.javadoc.skip=true -Dmaven.site.skip=true -DgenerateReports=false -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r -Dstream={stream}'
194             java-opts:
195                 - '-Xmx4096m -XX:MaxPermSize=1024m -Dmaven.compile.fork=true'
196             settings: '{mvn-settings}'
197             settings-type: cfp
198             global-settings: 'odl-global-settings'
199             global-settings-type: cfp
200
201     maven:
202         maven-name: '{mvn33}'
203         root-pom: 'distribution/pom.xml'
204         goals: 'clean install -V -B -Djenkins -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r'
205         maven-opts: '-Xmx1024m -XX:MaxPermSize=256m -Dmaven.compile.fork=true'
206         settings: '{mvn-settings}'
207         settings-type: cfp
208         global-settings: 'odl-global-settings'
209         global-settings-type: cfp
210         ignore-upstream-changes: true
211         post-step-run-condition: 'SUCCESS'
212
213     postbuilders:
214         - integration-distribution-check
215
216     publishers:
217         - email-notification:
218             email-prefix: '[{name}]'
219         - postbuildscript:
220             builders:
221                 - shell: |
222                     #!/bin/bash
223                     mkdir -p $WORKSPACE/archives
224                     cp karaf*.log $WORKSPACE/archives
225             script-only-if-succeeded: False
226             script-only-if-failed: False
227             mark-unstable-if-failed: True
228         - archive-build:
229             maven-version: '{mvn33}'
230
231 - job-template:
232     name: '{name}-validate-autorelease-{stream}'
233     disabled: '{obj:disable_autorelease}'
234
235     project-type: maven
236     node: dynamic_verify
237     concurrent: true
238     jdk: '{jdk}'
239
240     logrotate:
241         daysToKeep: '{build-days-to-keep}'
242         numToKeep: '{build-num-to-keep}'
243         artifactDaysToKeep: '{build-artifact-days-to-keep}'
244         artifactNumToKeep: '{build-artifact-num-to-keep}'
245
246     parameters:
247         - project-parameter:
248             project: '{project}'
249         - gerrit-parameters:
250             project: '{project}'
251             branch: '{branch}'
252             refspec: 'refs/heads/{branch}'
253         - autorelease-release-tag:
254             release-tag: 'validate'
255         - autorelease-release-branch:
256             release-branch: '{branch}'
257         - string:
258             name: CLONE_URL
259             default: 'ssh://jenkins-$SILO@git.opendaylight.org:29418/releng/autorelease'
260             description: "Autorelease clone URL"
261
262     scm:
263         - git:
264             url: '$CLONE_URL'
265             credentials-id: 'opendaylight-jenkins-ssh'
266             refspec: ''
267             branches:
268                 - 'origin/{branch}'
269             skip-tag: true
270             submodule:
271                 recursive: true
272                 timeout: 60
273
274     wrappers:
275         - opendaylight-infra-wrappers:
276             build-timeout: '{build-timeout}'
277
278     triggers:
279         - gerrit:
280             server-name: 'OpenDaylight'
281             trigger-on:
282                 - patchset-created-event:
283                     exclude-drafts: 'true'
284                     exclude-trivial-rebase: 'false'
285                     exclude-no-code-change: 'true'
286                 - draft-published-event
287                 - comment-added-contains-event:
288                     comment-contains-value: 'recheck'
289                 - comment-added-contains-event:
290                     comment-contains-value: 'reverify'
291                 - comment-added-contains-event:
292                     comment-contains-value: 'revalidate'
293             projects:
294               - project-compare-type: 'ANT'
295                 project-pattern: 'PROJECT_PATH'
296                 branches:
297                   - branch-compare-type: 'ANT'
298                     branch-pattern: '**/{branch}'
299                 file-paths:
300                     - compare-type: ANT
301                       pattern: '**/*.xml'
302
303     prebuilders:
304         - jacoco-nojava-workaround
305         - autorelease-checkout-gerrit-patch
306         - autorelease-generate-release-patches
307         - maven-target:
308             maven-version: '{mvn33}'
309             pom: validate-pom.xml
310             goals: 'clean install -V -B -T1.5C -Djenkins -DskipTests -Dcheckstyle.skip=true -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r'
311             java-opts:
312             - '-Xmx8g'
313             settings: 'autorelease-settings'
314             settings-type: cfp
315             global-settings: 'odl-global-settings'
316             global-settings-type: cfp
317
318     maven:
319         maven-name: '{mvn33}'
320         root-pom: 'pom.xml'
321         goals: 'clean validate -V -B -Djenkins -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r'
322         maven-opts: '-Xmx8g -XX:MaxPermSize=1024m -Dmaven.compile.fork=true'
323         settings: 'autorelease-settings'
324         settings-type: cfp
325         global-settings: 'odl-global-settings'
326         global-settings-type: cfp
327         automatic-archiving: false
328         post-step-run-condition: UNSTABLE
329
330     postbuilders:
331         - autorelease-sys-stats
332
333     publishers:
334         - email-notification:
335             email-prefix: '[autorelease] [{name}]'
336         - archive-build:
337             maven-version: '{mvn33}'