8 .. include:: ../job-groups.rst
10 Below is a list of Maven job groups:
12 .. literalinclude:: ../../jjb/lf-maven-job-groups.yaml
22 Runs Sonar against a Maven project.
26 :java-version: Version of Java to execute Sonar with.
27 :mvn-version: Version of Maven to execute Sonar with.
28 :mvn-settings: Maven settings.xml file containing credentials to use.
33 Calls the maven build script to perform a maven build.
37 :mvn-goals: The maven goals to perform for the build.
38 (default: clean deploy)
43 Common Jenkins configuration for Maven jobs.
48 Calls the maven deploy script to push artifacts to Nexus.
53 Calls the maven stage script to push artifacts to a Nexus staging repository.
55 lf-update-java-alternatives
56 ---------------------------
58 Setup Java alternatives for the Distro.
62 :java-version: Version of Java to set as the default Java.
71 Produces a CLM scan of the code into Nexus IQ Server.
75 - {project-name}-maven-clm-{stream}
79 :Comment Trigger: run-clm
83 :build-node: The node to run build on.
84 :jenkins-ssh-credential: Credential to use for SSH. (Generally should
85 be configured in defaults.yaml)
86 :mvn-settings: The name of settings file containing credentials for the project.
90 :branch: The branch to build against. (default: master)
91 :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
92 :build-timeout: Timeout in minutes before aborting build. (default: 60)
93 :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
94 :java-version: Version of Java to use for the build. (default: openjdk8)
95 :mvn-global-settings: The name of the Maven global settings to use for
96 Maven configuration. (default: global-settings)
97 :mvn-opts: Sets MAVEN_OPTS. (default: '')
98 :mvn-params: Additional mvn parameters to pass to the cli. (default: '')
99 :mvn-version: Version of maven to use. (default: mvn35)
100 :nexus-iq-stage: Stage the policy evaluation will be run against on
101 the Nexus IQ Server. (default: 'build')
102 :stream: Keyword that can be used to represent a release code-name.
103 Often the same as the branch. (default: master)
104 :submodule-recursive: Whether to checkout submodules recursively.
107 :gerrit_merge_triggers: Override Gerrit Triggers.
109 Maven JavaDoc Publish
110 ---------------------
112 Produces and publishes javadocs for a Maven project.
114 Expects javadocs to be available in $WORKSPACE/target/site/apidocs
118 - {project-name}-maven-javadoc-publish-{stream}
119 - gerrit-maven-javadoc-publish
120 - github-maven-javadoc-publish
122 :Comment Trigger: remerge
124 :Required parameters:
126 :build-node: The node to run build on.
127 :javadoc-path: The path in Nexus to deploy javadoc to.
128 :jenkins-ssh-credential: Credential to use for SSH. (Generally should
129 be configured in defaults.yaml)
130 :mvn-settings: The name of settings file containing credentials for the project.
131 :mvn-site-id: Maven Server ID from settings.xml to pull credentials from.
132 (Note: This setting should be configured in defaults.yaml.)
134 :Optional parameters:
136 :branch: The branch to build against. (default: master)
137 :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
138 :build-timeout: Timeout in minutes before aborting build. (default: 60)
139 :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
140 :java-version: Version of Java to use for the build. (default: openjdk8)
141 :mvn-global-settings: The name of the Maven global settings to use for
142 Maven configuration. (default: global-settings)
143 :mvn-opts: Sets MAVEN_OPTS. (default: '')
144 :mvn-params: Additional mvn parameters to pass to the cli. (default: '')
145 :mvn-version: Version of maven to use. (default: mvn35)
146 :stream: Keyword that can be used to represent a release code-name.
147 Often the same as the branch. (default: master)
148 :submodule-recursive: Whether to checkout submodules recursively.
151 :gerrit_merge_triggers: Override Gerrit Triggers.
156 Produces javadocs for a Maven project.
158 Expects javadocs to be available in $WORKSPACE/target/site/apidocs
162 - {project-name}-maven-javadoc-verify-{stream}
163 - gerrit-maven-javadoc-verify
164 - github-maven-javadoc-verify
166 :Comment Trigger: recheck|reverify
168 :Required parameters:
169 :build-node: The node to run build on.
170 :jenkins-ssh-credential: Credential to use for SSH. (Generally should
171 be configured in defaults.yaml)
172 :mvn-settings: The name of settings file containing credentials for the project.
174 :Optional parameters:
176 :branch: The branch to build against. (default: master)
177 :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
178 :build-timeout: Timeout in minutes before aborting build. (default: 60)
179 :deploy-path: The path in Nexus to deploy javadoc to. (default: $PROJECT/$STREAM)
180 :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
181 :java-version: Version of Java to use for the build. (default: openjdk8)
182 :mvn-global-settings: The name of the Maven global settings to use for
183 Maven configuration. (default: global-settings)
184 :mvn-opts: Sets MAVEN_OPTS. (default: '')
185 :mvn-params: Additional mvn parameters to pass to the cli. (default: '')
186 :mvn-version: Version of maven to use. (default: mvn35)
187 :stream: Keyword that can be used to represent a release code-name.
188 Often the same as the branch. (default: master)
189 :submodule-recursive: Whether to checkout submodules recursively.
192 :gerrit_verify_triggers: Override Gerrit Triggers.
197 Merge job which runs `mvn clean deploy` to build a project.
199 This job pushes files to Nexus using cURL instead of allowing the Maven deploy
200 goal to push the upload. This is to get around the issue that Maven deploy does
201 not properly support uploading files at the end of the build and instead pushes
202 as it goes. There exists a `-Ddeploy-at-end` feature however it does not work
205 This job uses the following strategy to deploy jobs to Nexus:
207 1. `wget -r` to fetch maven-metadata.xml from Nexus
208 2. `mvn deploy -DaltDeploymentRepository` to prepare files for upload
209 3. Removes untouched maven-metadata.xml files before upload
210 4. Use lftools (cURL) upload script to push artifacts to Nexus
214 - {project-name}-maven-merge-{stream}
218 :Comment Trigger: remerge
220 :Required parameters:
222 :build-node: The node to run build on.
223 :jenkins-ssh-credential: Credential to use for SSH. (Generally should
224 be configured in defaults.yaml)
225 :mvn-settings: The name of settings file containing credentials for the project.
226 :mvn-snapshot-id: Maven Server ID from settings.xml to pull credentials from.
227 (Note: This setting should be configured in defaults.yaml.)
228 :nexus-snapshot-repo: The repository id of the Nexus snapshot repo to deploy to.
230 :Optional parameters:
232 :branch: Git branch to fetch for the build. (default: master)
233 :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
234 :build-timeout: Timeout in minutes before aborting build. (default: 60)
235 :cron: Cron schedule when to trigger the job. This parameter also
236 supports multiline input via YAML pipe | character in cases where
237 one may want to provide more than 1 cron timer. (default: 'H H * * 0'
239 :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
240 :java-version: Version of Java to use for the build. (default: openjdk8)
241 :mvn-global-settings: The name of the Maven global settings to use for
242 Maven configuration. (default: global-settings)
243 :mvn-opts: Sets MAVEN_OPTS. (default: '')
244 :mvn-params: Additional mvn parameters to pass to the cli. (default: '')
245 :mvn-version: Version of maven to use. (default: mvn35)
246 :nexus-cut-dirs: Number of directories to cut from file path for `wget -r`.
247 :stream: Keyword that can be used to represent a release code-name.
248 Often the same as the branch. (default: master)
249 :submodule-recursive: Whether to checkout submodules recursively.
252 :gerrit_merge_triggers: Override Gerrit Triggers.
253 :gerrit_trigger_file_paths: Override file paths which can be used to
254 filter which file modifications will trigger a build.
259 Produces a release candidate by creating a staging repo in Nexus.
261 The staging repo name is in the format PROJECT-NUMBER for example "aaa-1234",
262 "autorelease-2000", "odlparent-1201", etc...
264 This job runs a Maven build and deploys to $WORKSPACE/m2repo directory. This
265 directory is then used later to deploy to Nexus.
269 - {project-name}-maven-stage-{stream}
273 :Required parameters:
275 :build-node: The node to run build on.
276 :jenkins-ssh-credential: Credential to use for SSH. (Generally should
277 be configured in defaults.yaml)
278 :mvn-settings: The name of settings file containing credentials for the project.
279 :mvn-staging-id: Maven Server ID from settings.xml to pull credentials from.
280 (Note: This setting should be configured in defaults.yaml.)
281 :staging-profile-id: Profile ID of the project's Nexus staging profile.
283 :Optional parameters:
285 :archive-artifacts: Artifacts to archive to the logs server (default: '').
286 :branch: The branch to build against. (default: master)
287 :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
288 :build-timeout: Timeout in minutes before aborting build. (default: 60)
289 :cron: Cron schedule when to trigger the job. This parameter also
290 supports multiline input via YAML pipe | character in cases where
291 one may want to provide more than 1 cron timer. (default: '')
292 :deploy-path: The path in Nexus to deploy javadoc to. (default: $PROJECT/$STREAM)
293 :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
294 :java-version: Version of Java to use for the build. (default: openjdk8)
295 :mvn-global-settings: The name of the Maven global settings to use for
296 Maven configuration. (default: global-settings)
297 :mvn-opts: Sets MAVEN_OPTS. (default: '')
298 :mvn-params: Additional mvn parameters to pass to the cli. (default: '')
299 :mvn-version: Version of maven to use. (default: mvn35)
300 :sign-artifacts: Sign artifacts with Sigul. (default: false)
301 :stream: Keyword that can be used to represent a release code-name.
302 Often the same as the branch. (default: master)
303 :submodule-recursive: Whether to checkout submodules recursively.
306 :gerrit_release_triggers: Override Gerrit Triggers.
311 Sonar job which runs mvn clean install then publishes to Sonar.
313 This job purposely only runs on the master branch as there are Additional
314 configuration needed to support multiple branches and there's not much
315 interest in that kind of support.
319 - {project-name}-sonar
323 :Comment Trigger: run-sonar
325 :Required parameters:
327 :build-node: The node to run build on.
328 :jenkins-ssh-credential: Credential to use for SSH. (Generally should
329 be configured in defaults.yaml)
330 :mvn-settings: The name of settings file containing credentials for the project.
332 :Optional parameters:
334 :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
335 :build-timeout: Timeout in minutes before aborting build. (default: 60)
336 :cron: Cron schedule when to trigger the job. This parameter also
337 supports multiline input via YAML pipe | character in cases where
338 one may want to provide more than 1 cron timer. (default: 'H H * * 6'
340 :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
341 :java-version: Version of Java to use for the build. (default: openjdk8)
342 :mvn-global-settings: The name of the Maven global settings to use for
343 Maven configuration. (default: global-settings)
344 :mvn-opts: Sets MAVEN_OPTS. (default: '')
345 :mvn-params: Additional mvn parameters to pass to the cli. (default: '')
346 :mvn-version: Version of maven to use. (default: mvn35)
347 :stream: Keyword that can be used to represent a release code-name.
348 Often the same as the branch. (default: master)
349 :submodule-recursive: Whether to checkout submodules recursively.
352 :gerrit_sonar_triggers: Override Gerrit Triggers.
357 Verify job which runs mvn clean install to test a project build..
361 - {project-name}-maven-verify-{stream}-{mvn-version}-{java-version}
362 - gerrit-maven-verify
363 - github-maven-verify
365 :Comment Trigger: recheck|reverify
367 :Required parameters:
369 :build-node: The node to run build on.
370 :jenkins-ssh-credential: Credential to use for SSH. (Generally should
371 be configured in defaults.yaml)
372 :mvn-settings: The name of settings file containing credentials for the project.
374 :Optional parameters:
376 :branch: Git branch to fetch for the build. (default: master)
377 :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
378 :build-timeout: Timeout in minutes before aborting build. (default: 60)
379 :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
380 :java-version: Version of Java to use for the build. (default: openjdk8)
381 :mvn-global-settings: The name of the Maven global settings to use for
382 Maven configuration. (default: global-settings)
383 :mvn-opts: Sets MAVEN_OPTS. (default: '')
384 :mvn-params: Additional mvn parameters to pass to the cli. (default: '')
385 :mvn-version: Version of maven to use. (default: mvn35)
386 :stream: Keyword that can be used to represent a release code-name.
387 Often the same as the branch. (default: master)
388 :submodule-recursive: Whether to checkout submodules recursively.
391 :gerrit_verify_triggers: Override Gerrit Triggers.
392 :gerrit_trigger_file_paths: Override file paths which can be used to
393 filter which file modifications will trigger a build.
395 Maven Verify /w Dependencies
396 ----------------------------
398 Verify job which runs mvn clean install to test a project build /w deps
400 This job can be used to verify a patch in conjunction to all of the
401 upstream patches it depends on. The user of this job can provide a list
406 - {project-name}-maven-verify-deps-{stream}-{mvn-version}-{java-version}
407 - gerrit-maven-verify-dependencies
409 :Comment Trigger: recheck: SPACE_SEPERATED_LIST_OF_PATCHES
411 :Required parameters:
413 :build-node: The node to run build on.
414 :jenkins-ssh-credential: Credential to use for SSH. (Generally should
415 be configured in defaults.yaml)
416 :mvn-settings: The name of settings file containing credentials for the project.
418 :Optional parameters:
420 :branch: Git branch to fetch for the build. (default: master)
421 :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
422 :build-timeout: Timeout in minutes before aborting build. (default: 60)
423 :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
424 :java-version: Version of Java to use for the build. (default: openjdk8)
425 :mvn-global-settings: The name of the Maven global settings to use for
426 Maven configuration. (default: global-settings)
427 :mvn-opts: Sets MAVEN_OPTS. (default: '')
428 :mvn-params: Additional mvn parameters to pass to the cli. (default: '')
429 :mvn-version: Version of maven to use. (default: mvn35)
430 :stream: Keyword that can be used to represent a release code-name.
431 Often the same as the branch. (default: master)
432 :submodule-recursive: Whether to checkout submodules recursively.
435 :gerrit_verify_triggers: Override Gerrit Triggers.
436 :gerrit_trigger_file_paths: Override file paths which can be used to
437 filter which file modifications will trigger a build.