Fix Sonar jobs
[releng/builder.git] / jjb / releng-templates-java.yaml
1 ---
2 - job-group:
3     name: odl-maven-jobs-jdk11
4
5     jobs:
6       - gerrit-maven-clm:
7           nexus-iq-namespace: odl-
8           nexus-iq-stage: release
9
10       - gerrit-maven-merge:
11           build-timeout: 180
12
13       - gerrit-maven-stage:
14           sign-artifacts: true
15           sbom-generator: true
16           cron: ""
17
18       - gerrit-maven-mri-stage:
19           sbom-generator: true
20           sign-artifacts: true
21           cron: ""
22
23     java-version: openjdk11
24     mvn-version: mvn38
25
26 - job-group:
27     name: odl-maven-jobs-jdk17
28
29     jobs:
30       - gerrit-maven-clm:
31           nexus-iq-namespace: odl-
32           nexus-iq-stage: release
33           mvn-opts: "--add-opens java.base/java.util=ALL-UNNAMED"
34
35       - gerrit-maven-merge:
36           build-timeout: 180
37
38       - gerrit-maven-stage:
39           sbom-generator: true
40           sign-artifacts: true
41           cron: ""
42
43       - gerrit-maven-mri-stage:
44           sbom-generator: true
45           sign-artifacts: true
46           cron: ""
47
48     java-version: openjdk17
49     mvn-version: mvn38
50
51 - job-group:
52     name: odl-maven-verify-jobs
53
54     jobs:
55       - gerrit-maven-verify
56       - gerrit-maven-verify-dependencies:
57           build-timeout: 180
58
59     mvn-version: mvn38
60
61 - job-group:
62     name: odl-maven-verify-jobs-jdk17
63
64     jobs:
65       - gerrit-maven-verify
66       - gerrit-maven-verify-dependencies:
67           build-timeout: 180
68
69     java-version: openjdk17
70     mvn-version: mvn38
71
72 - job-group:
73     name: odl-sonar-jobs-jdk11
74
75     jobs:
76       - gerrit-maven-sonar
77
78     java-version: openjdk11
79     mvn-version: mvn38
80     sonarcloud: true
81     sonarcloud-java-version: openjdk11
82     sonarcloud-project-organization: "{sonarcloud_project_organization}"
83     sonarcloud-api-token: "{sonarcloud_api_token}"
84     sonarcloud-project-key: "{sonarcloud_project_organization}_{project-name}"
85
86 - job-group:
87     name: odl-sonar-jobs-jdk17
88
89     jobs:
90       - gerrit-maven-sonar
91
92     java-version: openjdk17
93     mvn-version: mvn38
94     sonarcloud: true
95     sonarcloud-java-version: openjdk17
96     sonarcloud-project-organization: "{sonarcloud_project_organization}"
97     sonarcloud-api-token: "{sonarcloud_api_token}"
98     sonarcloud-project-key: "{sonarcloud_project_organization}_{project-name}"
99
100 - job-template:
101     name: "{project-name}-integration-{stream}"
102
103     ######################
104     # Default parameters #
105     ######################
106
107     archive-artifacts: >
108       **/*.log
109       **/hs_err_*.log
110       **/target/**/feature.xml
111       **/target/failsafe-reports/failsafe-summary.xml
112       **/target/surefire-reports/*-output.txt
113     mvn-goals: clean install
114     disable-job: false
115
116     #####################
117     # Job Configuration #
118     #####################
119
120     project-type: freestyle
121     node: "{build-node}"
122     jdk: "{java-version}"
123     disabled: "{disable-job}"
124
125     properties:
126       - opendaylight-infra-properties:
127           build-days-to-keep: "{build-days-to-keep}"
128
129     parameters:
130       - opendaylight-infra-parameters:
131           os-cloud: "{os-cloud}"
132           project: "{project}"
133           branch: "{branch}"
134           refspec: "refs/heads/{branch}"
135           artifacts: "{archive-artifacts}"
136
137     scm:
138       - git-scm:
139           refspec: ""
140           branch: "{branch}"
141
142     wrappers:
143       - opendaylight-infra-wrappers:
144           build-timeout: "{build-timeout}"
145
146     triggers:
147       - reverse:
148           jobs: "{dependencies}"
149           result: "success"
150
151     builders:
152       - lf-jacoco-nojava-workaround
153       - lf-provide-maven-settings:
154           global-settings-file: "global-settings"
155           settings-file: "{mvn-settings}"
156       - maven-target:
157           maven-version: "mvn35"
158           goals: |
159             {mvn-goals}
160             {opendaylight-infra-mvn-opts}
161           java-opts:
162             - "{mvn-opts}"
163           settings: "{mvn-settings}"
164           settings-type: cfp
165           global-settings: "global-settings"
166           global-settings-type: cfp
167
168     publishers:
169       - email-notification:
170           email-recipients: "{email-recipients}"
171           email-prefix: "{email-upstream}"
172       - findbugs
173       - lf-jacoco-report
174       - lf-infra-publish
175
176 - job-template:
177     name: "{project-name}-merge-{stream}"
178
179     ######################
180     # Default parameters #
181     ######################
182     disable-job: "false"
183
184     archive-artifacts: >
185       **/*.log
186       **/hs_err_*.log
187       **/target/**/feature.xml
188       **/target/failsafe-reports/failsafe-summary.xml
189       **/target/surefire-reports/*-output.txt
190     cron: "0 0 * * tue,sat"
191     mvn-opts: ""
192     mvn-version: mvn35
193
194     #####################
195     # Job Configuration #
196     #####################
197
198     # Need to keep jobs that deploy to Nexus at end of build as Maven
199     # projects. Maybe reconsider this once upstream moves deploy to a
200     # separate lifecycle:
201     #     https://issues.apache.org/jira/browse/MNG-5666
202     project-type: maven
203     node: "{build-node}"
204     jdk: "{java-version}"
205     disabled: "{disable-job}"
206
207     properties:
208       - opendaylight-infra-properties:
209           build-days-to-keep: 14
210
211     parameters:
212       - opendaylight-infra-parameters:
213           os-cloud: "{os-cloud}"
214           project: "{project}"
215           branch: "{branch}"
216           refspec: "refs/heads/{branch}"
217           artifacts: "{archive-artifacts}"
218       - string:
219           name: STREAM
220           default: "{stream}"
221           description: "String representing release name"
222
223     scm:
224       - gerrit-trigger-scm:
225           refspec: ""
226           choosing-strategy: "default"
227
228     wrappers:
229       - opendaylight-infra-wrappers:
230           build-timeout: "{build-timeout}"
231
232     triggers:
233       - timed: "{obj:cron}"
234       - gerrit-trigger-patch-merged:
235           gerrit-server-name: "{gerrit-server-name}"
236           name: "{project}"
237           branch: "{branch}"
238           files: "**"
239           forbidden-files: ""
240
241     prebuilders:
242       - lf-jacoco-nojava-workaround
243       - lf-provide-maven-settings:
244           global-settings-file: "global-settings"
245           settings-file: "{mvn-settings}"
246       - lf-maven-install:
247           mvn-version: "{mvn-version}"
248
249     # TODO: Do we want to apply sophisticated checks as in *-distribution-check-*?
250     maven:
251       maven-name: "{mvn-version}"
252       goals: >
253         {mvn-goals}
254         -Dmerge
255         -Dstream={stream}
256         {opendaylight-infra-mvn-opts}
257       maven-opts: "{mvn-opts}"
258       settings: "{mvn-settings}"
259       settings-type: cfp
260       global-settings: "global-settings"
261       global-settings-type: cfp
262       post-step-run-condition: UNSTABLE
263
264     reporters:
265       - findbugs
266
267     publishers:
268       - email-notification:
269           email-recipients: "{email-recipients}"
270           email-prefix: "[{project-name}]"
271       - maven-deploy:
272           id: ""
273           unique-version: true
274           deploy-unstable: false
275       - lf-jacoco-report
276       - lf-infra-publish