Removing version plugin from subproject
[ci-management.git] / jjb / global-templates-java.yaml
1 ---
2 - job-template:
3     # Job template for Java verify jobs
4     #
5     # The purpose of this job template is to run "maven clean install" for
6     # projects using this template.
7     #
8     # Required Variables:
9     #     branch:    git branch (eg. stable/lithium or master)
10
11     name: '{project-name}-{stream}-verify-java'
12
13     project-type: freestyle
14     concurrent: true
15     node: '{build-node}'
16
17     properties:
18       - ecomp-infra-properties:
19           build-days-to-keep: '{build-days-to-keep}'
20
21     parameters:
22       - ecomp-infra-parameters:
23           project: '{project}'
24           branch: '{branch}'
25           refspec: 'refs/heads/{branch}'
26           artifacts: '{archive-artifacts}'
27
28     scm:
29       - gerrit-trigger-scm:
30           refspec: '$GERRIT_REFSPEC'
31           choosing-strategy: 'gerrit'
32
33     wrappers:
34       - ecomp-infra-wrappers:
35           build-timeout: '{build-timeout}'
36
37     triggers:
38       - gerrit-trigger-patch-submitted:
39           server: '{server-name}'
40           project: '{project}'
41           branch: '{branch}'
42           files: '**'
43
44     builders:
45       - provide-maven-settings:
46           global-settings-file: 'global-settings'
47           settings-file: '{mvn-settings}'
48       - maven-target:
49           maven-version: 'mvn33'
50           goals: 'clean install'
51           settings: '{mvn-settings}'
52           settings-type: cfp
53           global-settings: 'global-settings'
54           global-settings-type: cfp
55
56 #     publishers:
57 #       - ecomp-infra-shiplogs:
58 #           maven-version: 'mvn33'
59
60 - job-template:
61     # Job template for Java verify jobs with POM not at the root
62     #
63     # The purpose of this job template is to run "maven clean install" for
64     # projects using this template.
65     #
66     # Required Variables:
67     #     branch:    git branch (eg. stable/lithium or master)
68     #     pom:       name/location of the pom.xml file relative to the workspace
69     #     pattern:   ant file-path pattern relative to the workspace used to
70     #                trigger the job
71
72     name: '{project-name}-{stream}-{subproject}-verify-java'
73
74     project-type: freestyle
75     concurrent: true
76     node: '{build-node}'
77
78     properties:
79       - ecomp-infra-properties:
80           build-days-to-keep: '{build-days-to-keep}'
81
82     parameters:
83       - ecomp-infra-parameters:
84           project: '{project}'
85           branch: '{branch}'
86           refspec: 'refs/heads/{branch}'
87           artifacts: '{archive-artifacts}'
88
89     scm:
90       - gerrit-trigger-scm:
91           refspec: '$GERRIT_REFSPEC'
92           choosing-strategy: 'gerrit'
93
94     wrappers:
95       - ecomp-infra-wrappers:
96           build-timeout: '{build-timeout}'
97
98     triggers:
99       - gerrit-trigger-patch-submitted:
100           server: '{server-name}'
101           project: '{project}'
102           branch: '{branch}'
103           files: '{pattern}'
104
105     builders:
106       - provide-maven-settings:
107           global-settings-file: 'global-settings'
108           settings-file: '{mvn-settings}'
109       - maven-target:
110           maven-version: 'mvn33'
111           pom: '{pom}'
112           goals: 'clean install'
113           settings: '{mvn-settings}'
114           settings-type: cfp
115           global-settings: 'global-settings'
116           global-settings-type: cfp
117
118 #     publishers:
119 #       - ecomp-infra-shiplogs:
120 #           maven-version: 'mvn33'
121
122 - job-template:
123     # Job template for Java daily release jobs
124     #
125     # The purpose of this job template is to run "maven version && maven clean
126     # deploy" for projects using this template.
127     #
128     # Required Variables:
129     #     branch:    git branch (eg. stable/lithium or master)
130     name: '{project-name}-{stream}-release-java-daily'
131
132     project-type: freestyle
133     node: '{build-node}'
134     maven-deploy-properties:
135     properties:
136       - ecomp-infra-properties:
137           build-days-to-keep: '{build-days-to-keep}'
138
139     parameters:
140       - ecomp-infra-parameters:
141           project: '{project}'
142           branch: '{branch}'
143           refspec: 'refs/heads/{branch}'
144           artifacts: '{archive-artifacts}'
145
146     scm:
147       - gerrit-trigger-scm:
148           refspec: ''
149           choosing-strategy: 'default'
150
151     wrappers:
152       - ecomp-infra-wrappers:
153           build-timeout: '{build-timeout}'
154
155     triggers:
156       # 11 AM UTC
157       - timed: 'H 11 * * *'
158
159     builders:
160       - provide-maven-settings:
161           global-settings-file: 'global-settings'
162           settings-file: '{mvn-settings}'
163
164       - inject:
165           properties-file: version.properties
166       - maven-target:
167           maven-version: 'mvn33'
168           goals: 'versions:set versions:update-child-modules versions:commit'
169           properties:
170             - 'newVersion=${{release_version}}'
171           settings: '{mvn-settings}'
172           settings-type: cfp
173           global-settings: 'global-settings'
174           global-settings-type: cfp
175
176       - maven-target:
177           maven-version: 'mvn33'
178           goals: 'clean deploy sonar:sonar -Dsonar.host.url=https://sonar.openecomp.org'
179           properties:
180             - '{maven-deploy-properties}'
181           settings: '{mvn-settings}'
182           settings-type: cfp
183           global-settings: 'global-settings'
184           global-settings-type: cfp
185
186 - job-template:
187     # Job template for Java daily release jobs with POM not at the root
188     #
189     # The purpose of this job template is to run "maven version && maven clean
190     # deploy" for projects using this template.
191     #
192     # Required Variables:
193     #     branch:    git branch (eg. stable/lithium or master)
194     #     pom:       name/location of the pom.xml file relative to the workspace
195
196
197     name: '{project-name}-{stream}-{subproject}-release-java-daily'
198
199     project-type: freestyle
200     node: '{build-node}'
201     maven-deploy-properties:
202     properties:
203       - ecomp-infra-properties:
204           build-days-to-keep: '{build-days-to-keep}'
205
206     parameters:
207       - ecomp-infra-parameters:
208           project: '{project}'
209           branch: '{branch}'
210           refspec: 'refs/heads/{branch}'
211           artifacts: '{archive-artifacts}'
212
213     scm:
214       - gerrit-trigger-scm:
215           refspec: ''
216           choosing-strategy: 'default'
217
218     wrappers:
219       - ecomp-infra-wrappers:
220           build-timeout: '{build-timeout}'
221
222     triggers:
223       # 11 AM UTC
224       - timed: 'H 11 * * *'
225
226     builders:
227       - provide-maven-settings:
228           global-settings-file: 'global-settings'
229           settings-file: '{mvn-settings}'
230
231       - maven-target:
232           maven-version: 'mvn33'
233           goals: 'clean deploy sonar:sonar -Dsonar.host.url=https://sonar.openecomp.org'
234           properties:
235             - '{maven-deploy-properties}'
236           settings: '{mvn-settings}'
237           settings-type: cfp
238           global-settings: 'global-settings'
239           global-settings-type: cfp
240
241 - job-template:
242     # Job template for Java merge jobs
243     #
244     # The purpose of this job template is to run "maven clean deploy" for
245     # projects using this template.
246     #
247     # Required Variables:
248     #     branch:    git branch (eg. stable/lithium or master)
249     name: '{project-name}-{stream}-merge-java'
250
251     project-type: freestyle
252     node: '{build-node}'
253
254     properties:
255       - ecomp-infra-properties:
256           build-days-to-keep: '{build-days-to-keep}'
257
258     parameters:
259       - ecomp-infra-parameters:
260           project: '{project}'
261           branch: '{branch}'
262           refspec: 'refs/heads/{branch}'
263           artifacts: '{archive-artifacts}'
264
265     scm:
266       - gerrit-trigger-scm:
267           refspec: ''
268           choosing-strategy: 'default'
269
270     wrappers:
271       - ecomp-infra-wrappers:
272           build-timeout: '{build-timeout}'
273
274     triggers:
275       - gerrit-trigger-patch-merged:
276           server: '{server-name}'
277           project: '{project}'
278           branch: '{branch}'
279           files: '**'
280
281     builders:
282       - provide-maven-settings:
283           global-settings-file: 'global-settings'
284           settings-file: '{mvn-settings}'
285       - maven-target:
286           maven-version: 'mvn33'
287           # yamllint disable rule:line-length
288           goals: 'clean deploy'
289           # yamllint enable
290           settings: '{mvn-settings}'
291           settings-type: cfp
292           global-settings: 'global-settings'
293           global-settings-type: cfp
294
295 #     publishers:
296 #       - ecomp-infra-shiplogs:
297 #           maven-version: 'mvn33'
298
299 - job-template:
300     # Job template for Java merge jobs with POM not at the root
301     #
302     # The purpose of this job template is to run "maven clean deploy" for
303     # projects using this template.
304     #
305     # Required Variables:
306     #     branch:    git branch (eg. stable/lithium or master)
307     #     pom:       name/location of the pom.xml file relative to the workspace
308     #     pattern:   ant file-path pattern relative to the workspace used to
309     #                trigger the job
310
311     name: '{project-name}-{stream}-{subproject}-merge-java'
312
313     project-type: freestyle
314     node: '{build-node}'
315
316     properties:
317       - ecomp-infra-properties:
318           build-days-to-keep: '{build-days-to-keep}'
319
320     parameters:
321       - ecomp-infra-parameters:
322           project: '{project}'
323           branch: '{branch}'
324           refspec: 'refs/heads/{branch}'
325           artifacts: '{archive-artifacts}'
326
327     scm:
328       - gerrit-trigger-scm:
329           refspec: ''
330           choosing-strategy: 'default'
331
332     wrappers:
333       - ecomp-infra-wrappers:
334           build-timeout: '{build-timeout}'
335
336     triggers:
337       - gerrit-trigger-patch-merged:
338           server: '{server-name}'
339           project: '{project}'
340           branch: '{branch}'
341           files: '{pattern}'
342
343     builders:
344       - provide-maven-settings:
345           global-settings-file: 'global-settings'
346           settings-file: '{mvn-settings}'
347       - maven-target:
348           maven-version: 'mvn33'
349           pom: '{pom}'
350           # yamllint disable rule:line-length
351           goals: 'clean deploy'
352           # yamllint enable
353           settings: '{mvn-settings}'
354           settings-type: cfp
355           global-settings: 'global-settings'
356           global-settings-type: cfp
357
358 #     publishers:
359 #       - ecomp-infra-shiplogs:
360 #           maven-version: 'mvn33'
361
362 - job-template:
363     name: '{project-name}-{stream}-docker-java-daily'
364     project-type: freestyle
365     node: 'ubuntu1604-docker-8c-8g'
366
367     properties:
368       - ecomp-infra-properties:
369           build-days-to-keep: '{build-days-to-keep}'
370
371     parameters:
372       - ecomp-infra-parameters:
373           project: '{project}'
374           branch: '{branch}'
375           refspec: 'refs/heads/{branch}'
376           artifacts: '{archive-artifacts}'
377
378     scm:
379       - gerrit-trigger-scm:
380           refspec: ''
381           choosing-strategy: 'default'
382
383     wrappers:
384       - ecomp-infra-wrappers:
385           build-timeout: '{build-timeout}'
386
387     triggers:
388       # 11 AM UTC
389       - timed: 'H 12 * * *'
390
391     builders:
392
393       - provide-maven-settings:
394           global-settings-file: 'global-settings'
395           settings-file: '{mvn-settings}'
396
397       - docker-login
398
399       - maven-docker-push-daily:
400           mvn-settings: '{mvn-settings}'
401           pom: '{docker-pom}'