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-namespace: Insert a namespace to project AppID for projects that
101 share a Nexus IQ system to avoid project name collision. We recommend
102 inserting a trailing - dash if using this parameter.
103 For example 'odl-'. (default: '')
104 :nexus-iq-stage: Stage the policy evaluation will be run against on
105 the Nexus IQ Server. (default: 'build')
106 :stream: Keyword that can be used to represent a release code-name.
107 Often the same as the branch. (default: master)
108 :submodule-recursive: Whether to checkout submodules recursively.
110 :submodule-timeout: Timeout (in minutes) for checkout operation.
113 :gerrit_merge_triggers: Override Gerrit Triggers.
115 Maven JavaDoc Publish
116 ---------------------
118 Produces and publishes javadocs for a Maven project.
120 Expects javadocs to be available in $WORKSPACE/target/site/apidocs
124 - {project-name}-maven-javadoc-publish-{stream}
125 - gerrit-maven-javadoc-publish
126 - github-maven-javadoc-publish
128 :Comment Trigger: remerge
130 :Required parameters:
132 :build-node: The node to run build on.
133 :javadoc-path: The path in Nexus to deploy javadoc to.
134 :jenkins-ssh-credential: Credential to use for SSH. (Generally should
135 be configured in defaults.yaml)
136 :mvn-settings: The name of settings file containing credentials for the project.
137 :mvn-site-id: Maven Server ID from settings.xml to pull credentials from.
138 (Note: This setting should be configured in defaults.yaml.)
140 :Optional parameters:
142 :branch: The branch to build against. (default: master)
143 :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
144 :build-timeout: Timeout in minutes before aborting build. (default: 60)
145 :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
146 :java-version: Version of Java to use for the build. (default: openjdk8)
147 :mvn-global-settings: The name of the Maven global settings to use for
148 Maven configuration. (default: global-settings)
149 :mvn-opts: Sets MAVEN_OPTS. (default: '')
150 :mvn-params: Additional mvn parameters to pass to the cli. (default: '')
151 :mvn-version: Version of maven to use. (default: mvn35)
152 :stream: Keyword that can be used to represent a release code-name.
153 Often the same as the branch. (default: master)
154 :submodule-recursive: Whether to checkout submodules recursively.
156 :submodule-timeout: Timeout (in minutes) for checkout operation.
159 :gerrit_merge_triggers: Override Gerrit Triggers.
164 Produces javadocs for a Maven project.
166 Expects javadocs to be available in $WORKSPACE/target/site/apidocs
170 - {project-name}-maven-javadoc-verify-{stream}
171 - gerrit-maven-javadoc-verify
172 - github-maven-javadoc-verify
174 :Comment Trigger: recheck|reverify
176 :Required parameters:
177 :build-node: The node to run build on.
178 :jenkins-ssh-credential: Credential to use for SSH. (Generally should
179 be configured in defaults.yaml)
180 :mvn-settings: The name of settings file containing credentials for the project.
182 :Optional parameters:
184 :branch: The branch to build against. (default: master)
185 :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
186 :build-timeout: Timeout in minutes before aborting build. (default: 60)
187 :deploy-path: The path in Nexus to deploy javadoc to. (default: $PROJECT/$STREAM)
188 :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
189 :java-version: Version of Java to use for the build. (default: openjdk8)
190 :mvn-global-settings: The name of the Maven global settings to use for
191 Maven configuration. (default: global-settings)
192 :mvn-opts: Sets MAVEN_OPTS. (default: '')
193 :mvn-params: Additional mvn parameters to pass to the cli. (default: '')
194 :mvn-version: Version of maven to use. (default: mvn35)
195 :stream: Keyword that can be used to represent a release code-name.
196 Often the same as the branch. (default: master)
197 :submodule-recursive: Whether to checkout submodules recursively.
199 :submodule-timeout: Timeout (in minutes) for checkout operation.
202 :gerrit_verify_triggers: Override Gerrit Triggers.
207 Merge job which runs `mvn clean deploy` to build a project.
209 This job pushes files to Nexus using cURL instead of allowing the Maven deploy
210 goal to push the upload. This is to get around the issue that Maven deploy does
211 not properly support uploading files at the end of the build and instead pushes
212 as it goes. There exists a `-Ddeploy-at-end` feature however it does not work
215 This job uses the following strategy to deploy jobs to Nexus:
217 1. `wget -r` to fetch maven-metadata.xml from Nexus
218 2. `mvn deploy -DaltDeploymentRepository` to prepare files for upload
219 3. Removes untouched maven-metadata.xml files before upload
220 4. Use lftools (cURL) upload script to push artifacts to Nexus
224 - {project-name}-maven-merge-{stream}
228 :Comment Trigger: remerge
230 :Required parameters:
232 :build-node: The node to run build on.
233 :jenkins-ssh-credential: Credential to use for SSH. (Generally should
234 be configured in defaults.yaml)
235 :mvn-settings: The name of settings file containing credentials for the project.
236 :mvn-snapshot-id: Maven Server ID from settings.xml to pull credentials from.
237 (Note: This setting should be configured in defaults.yaml.)
238 :nexus-snapshot-repo: The repository id of the Nexus snapshot repo to deploy to.
240 :Optional parameters:
242 :branch: Git branch to fetch for the build. (default: master)
243 :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
244 :build-timeout: Timeout in minutes before aborting build. (default: 60)
245 :cron: Cron schedule when to trigger the job. This parameter also
246 supports multiline input via YAML pipe | character in cases where
247 one may want to provide more than 1 cron timer. (default: 'H H * * 0'
249 :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
250 :java-version: Version of Java to use for the build. (default: openjdk8)
251 :mvn-global-settings: The name of the Maven global settings to use for
252 Maven configuration. (default: global-settings)
253 :mvn-opts: Sets MAVEN_OPTS. (default: '')
254 :mvn-params: Additional mvn parameters to pass to the cli. (default: '')
255 :mvn-version: Version of maven to use. (default: mvn35)
256 :nexus-cut-dirs: Number of directories to cut from file path for `wget -r`.
257 :stream: Keyword that can be used to represent a release code-name.
258 Often the same as the branch. (default: master)
259 :submodule-recursive: Whether to checkout submodules recursively.
261 :submodule-timeout: Timeout (in minutes) for checkout operation.
264 :gerrit_merge_triggers: Override Gerrit Triggers.
265 :gerrit_trigger_file_paths: Override file paths which can be used to
266 filter which file modifications will trigger a build.
271 Produces a release candidate by creating a staging repo in Nexus.
273 The staging repo name is in the format PROJECT-NUMBER for example "aaa-1234",
274 "autorelease-2000", "odlparent-1201", etc...
276 This job runs a Maven build and deploys to $WORKSPACE/m2repo directory. This
277 directory is then used later to deploy to Nexus.
281 - {project-name}-maven-stage-{stream}
285 :Required parameters:
287 :build-node: The node to run build on.
288 :jenkins-ssh-credential: Credential to use for SSH. (Generally should
289 be configured in defaults.yaml)
290 :mvn-settings: The name of settings file containing credentials for the project.
291 :mvn-staging-id: Maven Server ID from settings.xml to pull credentials from.
292 (Note: This setting should be configured in defaults.yaml.)
293 :staging-profile-id: Profile ID of the project's Nexus staging profile.
295 :Optional parameters:
297 :archive-artifacts: Artifacts to archive to the logs server (default: '').
298 :branch: The branch to build against. (default: master)
299 :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
300 :build-timeout: Timeout in minutes before aborting build. (default: 60)
301 :cron: Cron schedule when to trigger the job. This parameter also
302 supports multiline input via YAML pipe | character in cases where
303 one may want to provide more than 1 cron timer. (default: '')
304 :deploy-path: The path in Nexus to deploy javadoc to. (default: $PROJECT/$STREAM)
305 :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
306 :java-version: Version of Java to use for the build. (default: openjdk8)
307 :mvn-global-settings: The name of the Maven global settings to use for
308 Maven configuration. (default: global-settings)
309 :mvn-opts: Sets MAVEN_OPTS. (default: '')
310 :mvn-params: Additional mvn parameters to pass to the cli. (default: '')
311 :mvn-version: Version of maven to use. (default: mvn35)
312 :sign-artifacts: Sign artifacts with Sigul. (default: false)
313 :stream: Keyword that can be used to represent a release code-name.
314 Often the same as the branch. (default: master)
315 :submodule-recursive: Whether to checkout submodules recursively.
317 :submodule-timeout: Timeout (in minutes) for checkout operation.
320 :gerrit_release_triggers: Override Gerrit Triggers.
325 Sonar job which runs mvn clean install then publishes to Sonar.
327 This job purposely only runs on the master branch as there are Additional
328 configuration needed to support multiple branches and there's not much
329 interest in that kind of support.
333 - {project-name}-sonar
337 :Comment Trigger: run-sonar
339 :Required parameters:
341 :build-node: The node to run build on.
342 :jenkins-ssh-credential: Credential to use for SSH. (Generally should
343 be configured in defaults.yaml)
344 :mvn-settings: The name of settings file containing credentials for the project.
346 :Optional parameters:
348 :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
349 :build-timeout: Timeout in minutes before aborting build. (default: 60)
350 :cron: Cron schedule when to trigger the job. This parameter also
351 supports multiline input via YAML pipe | character in cases where
352 one may want to provide more than 1 cron timer. (default: 'H H * * 6'
354 :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
355 :java-version: Version of Java to use for the build. (default: openjdk8)
356 :mvn-global-settings: The name of the Maven global settings to use for
357 Maven configuration. (default: global-settings)
358 :mvn-opts: Sets MAVEN_OPTS. (default: '')
359 :mvn-params: Additional mvn parameters to pass to the cli. (default: '')
360 :mvn-version: Version of maven to use. (default: mvn35)
361 :stream: Keyword that can be used to represent a release code-name.
362 Often the same as the branch. (default: master)
363 :submodule-recursive: Whether to checkout submodules recursively.
365 :submodule-timeout: Timeout (in minutes) for checkout operation.
368 :gerrit_sonar_triggers: Override Gerrit Triggers.
373 Verify job which runs mvn clean install to test a project build..
377 - {project-name}-maven-verify-{stream}-{mvn-version}-{java-version}
378 - gerrit-maven-verify
379 - github-maven-verify
381 :Comment Trigger: recheck|reverify
383 :Required parameters:
385 :build-node: The node to run build on.
386 :jenkins-ssh-credential: Credential to use for SSH. (Generally should
387 be configured in defaults.yaml)
388 :mvn-settings: The name of settings file containing credentials for the project.
390 :Optional parameters:
392 :branch: Git branch to fetch for the build. (default: master)
393 :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
394 :build-timeout: Timeout in minutes before aborting build. (default: 60)
395 :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
396 :java-version: Version of Java to use for the build. (default: openjdk8)
397 :mvn-global-settings: The name of the Maven global settings to use for
398 Maven configuration. (default: global-settings)
399 :mvn-opts: Sets MAVEN_OPTS. (default: '')
400 :mvn-params: Additional mvn parameters to pass to the cli. (default: '')
401 :mvn-version: Version of maven to use. (default: mvn35)
402 :stream: Keyword that can be used to represent a release code-name.
403 Often the same as the branch. (default: master)
404 :submodule-recursive: Whether to checkout submodules recursively.
406 :submodule-timeout: Timeout (in minutes) for checkout operation.
409 :gerrit_verify_triggers: Override Gerrit Triggers.
410 :gerrit_trigger_file_paths: Override file paths which can be used to
411 filter which file modifications will trigger a build.
413 Maven Verify /w Dependencies
414 ----------------------------
416 Verify job which runs mvn clean install to test a project build /w deps
418 This job can be used to verify a patch in conjunction to all of the
419 upstream patches it depends on. The user of this job can provide a list
424 - {project-name}-maven-verify-deps-{stream}-{mvn-version}-{java-version}
425 - gerrit-maven-verify-dependencies
427 :Comment Trigger: recheck: SPACE_SEPERATED_LIST_OF_PATCHES
429 :Required parameters:
431 :build-node: The node to run build on.
432 :jenkins-ssh-credential: Credential to use for SSH. (Generally should
433 be configured in defaults.yaml)
434 :mvn-settings: The name of settings file containing credentials for the project.
436 :Optional parameters:
438 :branch: Git branch to fetch for the build. (default: master)
439 :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
440 :build-timeout: Timeout in minutes before aborting build. (default: 60)
441 :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
442 :java-version: Version of Java to use for the build. (default: openjdk8)
443 :mvn-global-settings: The name of the Maven global settings to use for
444 Maven configuration. (default: global-settings)
445 :mvn-opts: Sets MAVEN_OPTS. (default: '')
446 :mvn-params: Additional mvn parameters to pass to the cli. (default: '')
447 :mvn-version: Version of maven to use. (default: mvn35)
448 :stream: Keyword that can be used to represent a release code-name.
449 Often the same as the branch. (default: master)
450 :submodule-recursive: Whether to checkout submodules recursively.
452 :submodule-timeout: Timeout (in minutes) for checkout operation.
455 :gerrit_verify_triggers: Override Gerrit Triggers.
456 :gerrit_trigger_file_paths: Override file paths which can be used to
457 filter which file modifications will trigger a build.