c9208a18b3dc51ca54b2ddb8811e52fcbb6dd2b5
[releng/global-jjb.git] / docs / jjb / lf-maven-jobs.rst
1 ##########
2 Maven Jobs
3 ##########
4
5 Job Groups
6 ==========
7
8 .. include:: ../job-groups.rst
9
10 Below is a list of Maven job groups:
11
12 .. literalinclude:: ../../jjb/lf-maven-job-groups.yaml
13    :language: yaml
14
15
16 Macros
17 ======
18
19 lf-infra-maven-sonar
20 --------------------
21
22 Runs Sonar against a Maven project.
23
24 :Required Parameters:
25
26     :java-version: Version of Java to execute Sonar with. (default: openjdk11)
27     :mvn-version: Version of Maven to execute Sonar with.
28     :mvn-settings: Maven settings.xml file containing credentials to use.
29
30 lf-infra-maven-sonarcloud
31 -------------------------
32
33 Runs Sonar against a Maven project and pushes results to SonarCloud.
34
35 :Required Parameters:
36
37     :java-version: Version of Java to execute Maven build. (default: openjdk11)
38     :mvn-version: Version of Maven to execute Sonar with.
39     :mvn-settings: Maven settings.xml file containing credentials to use.
40     :sonarcloud-project-key: SonarCloud project key.
41     :sonarcloud-project-organization: SonarCloud project organization.
42     :sonarcloud-java-version: Version of Java to run the Sonar scan. (default: openjdk11)
43     :sonarcloud-qualitygate-wait: SonarCloud flag that forces the analysis step to
44         wait for the quality gate result. (default: false)
45
46 lf-maven-build
47 --------------
48
49 Calls the maven build script to perform a maven build.
50
51 :Required parameters:
52
53     :mvn-goals: The maven goals to perform for the build.
54         (default: clean deploy)
55
56 lf-maven-common
57 ---------------
58
59 Common Jenkins configuration for Maven jobs.
60
61 lf-maven-deploy
62 ---------------
63
64 Calls the maven deploy script to push artifacts to Nexus.
65
66 lf-maven-versions-plugin
67 ------------------------
68
69 Conditionally calls Maven versions plugin to set, update and commit the maven `versions:set`.
70
71 :Required Parameters:
72
73     :maven-versions-plugin: Whether to call Maven versions plugin or not. (default: false)
74     :version-properties-file: Name and path of the version properties file.
75         (default: version.properties)
76     :mvn-version: Version of Maven to execute Sonar with.
77     :mvn-pom: Location of pom.xml.
78     :mvn-settings: Maven settings.xml file containing credentials to use.
79
80 lf-maven-stage
81 --------------
82
83 Calls the maven stage script to push artifacts to a Nexus staging repository.
84
85 :Required Parameters:
86
87     :mvn-global-settings: The name of the Maven global settings to use for
88         Maven configuration.
89     :mvn-settings: The name of settings file containing credentials for the project.
90
91 lf-update-java-alternatives
92 ---------------------------
93
94 Setup Java alternatives for the Distro.
95
96 :Required Parameters:
97
98     :java-version: Version of Java to set as the default Java.
99         Eg. openjdk11
100
101 lf-infra-sonatype-clm
102 ---------------------
103
104 Runs a Sonatype CLM scan against a Maven project and pushes results to
105 Nexus IQ server.
106
107 :Optional parameters:
108     :mvn-goals: The maven goals to perform for the build.
109         (default: clean install)
110
111 lf-infra-maven-sbom-generator
112 -----------------------------
113
114 Runs a specific version of SPDX SBOM Generator tool to generate a report.
115 The calling job template sets the version to run in the SBOM_GENERATOR_VERSION parameter.
116
117 :Optional parameters:
118     :sbom-flags: SBOM generator options. See https://github.com/opensbom-generator/spdx-sbom-generator
119
120 Job Templates
121 =============
122
123 Maven CLM
124 ---------
125
126 Produces a CLM scan of the code into Nexus IQ Server.
127
128 :Template Names:
129
130     - {project-name}-maven-clm-{stream}
131     - gerrit-maven-clm
132     - github-maven-clm
133
134 :Comment Trigger: run-clm
135
136 :Required parameters:
137
138     :build-node:    The node to run build on.
139     :jenkins-ssh-credential: Credential to use for SSH. (Generally configured in defaults.yaml)
140     :mvn-settings: The name of settings file containing credentials for the project.
141
142 :Optional parameters:
143
144     :branch: The branch to build against. (default: master)
145     :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
146     :build-timeout: Timeout in minutes before aborting build. (default: 60)
147     :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
148     :java-version: Version of Java to use for the build. (default: openjdk11)
149     :mvn-global-settings: The name of the Maven global settings to use for
150         Maven configuration. (default: global-settings)
151     :mvn-goals: The maven goals to perform for the build.
152         (default: clean install)
153     :mvn-opts: Sets MAVEN_OPTS to start up the JVM running Maven. (default: '')
154     :mvn-params: Parameters to pass to the mvn CLI. (default: '')
155     :mvn-version: Version of maven to use. (default: mvn35)
156     :nexus-iq-namespace: Insert a namespace to project AppID for projects that
157         share a Nexus IQ system to avoid project name collision. We recommend
158         inserting a trailing - dash if using this parameter.
159         For example 'odl-'. (default: '')
160     :nexus-iq-stage: Sets the **stage** which the policy evaluation will run
161         against on the Nexus IQ Server. (default: 'build')
162     :stream: Keyword that represents a release code-name.
163         Often the same as the branch. (default: master)
164     :submodule-recursive: Whether to checkout submodules recursively.
165         (default: true)
166     :submodule-timeout: Timeout (in minutes) for checkout operation.
167         (default: 10)
168     :submodule-disable: Disable submodule checkout operation.
169         (default: false)
170
171     :gerrit_merge_triggers: Override Gerrit Triggers.
172
173 Maven JavaDoc Publish
174 ---------------------
175
176 Produces and publishes javadocs for a Maven project.
177
178 Expects javadocs to be available in ``$WORKSPACE/target/site/apidocs``, but
179 overrideable with the ``mvn-dir`` parameter. If set, will search for javadocs
180 in ``$WORKSPACE/{mvn-dir}/target/site/apidocs``.
181
182 :Template Names:
183
184     - {project-name}-maven-javadoc-publish-{stream}-{java-version}
185     - gerrit-maven-javadoc-publish
186     - github-maven-javadoc-publish
187
188 :Comment Trigger: remerge
189
190 :Required parameters:
191
192     :build-node: The node to run build on.
193     :javadoc-path: The path in Nexus to deploy javadoc to.
194     :jenkins-ssh-credential: Credential to use for SSH. (Generally configured in defaults.yaml)
195     :mvn-settings: The name of settings file containing credentials for the project.
196     :mvn-site-id: Maven Server ID from settings.xml to pull credentials from.
197         (Note: This setting is generally configured in ``defaults.yaml``.)
198
199 :Optional parameters:
200
201     :branch: The branch to build against. (default: master)
202     :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
203     :build-timeout: Timeout in minutes before aborting build. (default: 60)
204     :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
205     :java-version: Version of Java to use for the build. (default: openjdk11)
206     :mvn-dir: Directory supplied as argument to -f option (default: '.')
207     :mvn-global-settings: The name of the Maven global settings to use for
208         Maven configuration. (default: global-settings)
209     :mvn-opts: Sets MAVEN_OPTS to start up the JVM running Maven. (default: '')
210     :mvn-params: Parameters to pass to the mvn CLI. (default: '')
211         Must not include a "-f" option; see parameter mvn-dir.
212     :mvn-version: Version of maven to use. (default: mvn35)
213     :stream: Keyword that represents a release code-name.
214         Often the same as the branch. (default: master)
215     :submodule-recursive: Whether to checkout submodules recursively.
216         (default: true)
217     :submodule-timeout: Timeout (in minutes) for checkout operation.
218         (default: 10)
219     :submodule-disable: Disable submodule checkout operation.
220         (default: false)
221
222     :gerrit_merge_triggers: Override Gerrit Triggers.
223
224 Maven JavaDoc Verify
225 --------------------
226
227 Produces javadocs for a Maven project.
228
229 Expects javadocs to be available in ``$WORKSPACE/target/site/apidocs``, but
230 overrideable with the ``mvn-dir`` parameter. If set, will search for javadocs
231 in ``$WORKSPACE/{mvn-dir}/target/site/apidocs``.
232
233 :Template Names:
234
235     - {project-name}-maven-javadoc-verify-{stream}-{java-version}
236     - gerrit-maven-javadoc-verify
237     - github-maven-javadoc-verify
238
239 :Comment Trigger: recheck|reverify
240
241 :Required parameters:
242     :build-node:    The node to run build on.
243     :jenkins-ssh-credential: Credential to use for SSH. (Generally configured in defaults.yaml)
244     :mvn-settings: The name of settings file containing credentials for the project.
245
246 :Optional parameters:
247
248     :branch: The branch to build against. (default: master)
249     :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
250     :build-timeout: Timeout in minutes before aborting build. (default: 60)
251     :deploy-path:    The path in Nexus to deploy javadoc to. (default: $PROJECT/$STREAM)
252     :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
253     :java-version: Version of Java to use for the build. (default: openjdk11)
254     :mvn-dir: Directory supplied as argument to -f option (default: '.')
255     :mvn-global-settings: The name of the Maven global settings to use for
256         Maven configuration. (default: global-settings)
257     :mvn-opts: Sets MAVEN_OPTS to start up the JVM running Maven. (default: '')
258     :mvn-params: Parameters to pass to the mvn CLI. (default: '')
259         Must not include a "-f" option; see parameter mvn-dir.
260     :mvn-version: Version of maven to use. (default: mvn35)
261     :stream: Keyword that represents a release code-name.
262         Often the same as the branch. (default: master)
263     :submodule-recursive: Whether to checkout submodules recursively.
264         (default: true)
265     :submodule-timeout: Timeout (in minutes) for checkout operation.
266         (default: 10)
267     :submodule-disable: Disable submodule checkout operation.
268         (default: false)
269
270     :gerrit_verify_triggers: Override Gerrit Triggers.
271
272 Maven Merge
273 -----------
274
275 Merge job which runs `mvn clean deploy` to build a project.
276
277 This job pushes files to Nexus using cURL instead of allowing the Maven deploy
278 goal to push the upload. This is to get around the issue that Maven deploy does
279 not properly support uploading files at the end of the build and instead pushes
280 as it goes. There exists a ``-Ddeploy-at-end`` feature but it does not work
281 with extensions.
282
283 This job uses the following strategy to deploy jobs to Nexus:
284
285 1. ``wget -r`` to fetch maven-metadata.xml from Nexus
286 2. ``mvn deploy -DaltDeploymentRepository`` to prepare files for upload
287 3. Removes untouched maven-metadata.xml files before upload
288 4. Use lftools (cURL) upload script to push artifacts to Nexus
289
290 :Template Names:
291
292     - {project-name}-maven-merge-{stream}
293     - gerrit-maven-merge
294     - github-maven-merge
295
296 :Comment Trigger: remerge
297
298 :Required parameters:
299
300     :build-node: The node to run build on.
301     :jenkins-ssh-credential: Credential to use for SSH. (Generally configured in defaults.yaml)
302     :mvn-settings: The name of settings file containing credentials for the project.
303     :mvn-snapshot-id: Maven Server ID from settings.xml to pull credentials from.
304         (Note: This setting is generally configured in ``defaults.yaml``.)
305     :nexus-snapshot-repo: The repository id of the Nexus snapshot repo to deploy to.
306
307 :Optional parameters:
308
309     :branch: Git branch to fetch for the build. (default: master)
310     :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
311     :build-timeout: Timeout in minutes before aborting build. (default: 60)
312     :cron: Cron schedule when to trigger the job. This parameter also
313         supports multiline input via YAML pipe | character in cases where
314         one may want to provide more than 1 cron timer. (default: 'H H * * 0'
315         to run weekly)
316     :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
317     :java-version: Version of Java to use for the build. (default: openjdk11)
318     :mvn-global-settings: The name of the Maven global settings to use for
319         Maven configuration. (default: global-settings)
320     :mvn-opts: Sets MAVEN_OPTS to start up the JVM running Maven. (default: '')
321     :mvn-params: Parameters to pass to the mvn CLI. (default: '')
322     :mvn-version: Version of maven to use. (default: mvn35)
323     :nexus-cut-dirs: Number of directories to cut from file path for `wget -r`.
324     :pre-build-script: Shell script to run before maven build. (default: a string with a shell comment)
325     :post-build-script: Shell script to run after maven build. (default: a string with a shell comment)
326     :stream: Keyword that represents a release code-name.
327         Often the same as the branch. (default: master)
328     :submodule-recursive: Whether to checkout submodules recursively.
329         (default: true)
330     :submodule-timeout: Timeout (in minutes) for checkout operation.
331         (default: 10)
332     :submodule-disable: Disable submodule checkout operation.
333         (default: false)
334
335     :gerrit_merge_triggers: Override Gerrit Triggers.
336     :gerrit_trigger_file_paths: Override file paths to filter which file
337         modifications will trigger a build.
338
339 Maven Merge for Docker
340 ----------------------
341
342 Produces a snapshot docker image in a Nexus registry. Appropriate for
343 Java projects that do not need to deploy any POM or JAR files.
344
345 Like the Maven Merge job as described above but logs in to Docker
346 registries first and skips the lf-maven-deploy builder. The project
347 POM file should invoke a plugin to build and push a Docker image.
348 This pulls the base image from the registry in the environment
349 variable ``CONTAINER_PULL_REGISTRY`` and pushes new image into the
350 registry in the environment variable ``CONTAINER_PUSH_REGISTRY``.
351
352 :Template Names:
353
354     - {project-name}-maven-docker-merge-{stream}
355     - gerrit-maven-docker-merge
356     - github-maven-docker-merge
357
358 :Required parameters:
359
360     :container-public-registry: Docker registry source with base images.
361     :container-snapshot-registry: Docker registry target for the deploy action.
362
363 All other required and optional parameters are identical to the Maven Merge job
364 described above.
365
366 Maven Stage
367 -----------
368
369 Produces a release candidate by creating a staging repo in Nexus.
370
371 The staging repo name is in the format PROJECT-NUMBER for example "aaa-1234",
372 "autorelease-2000", "odlparent-1201", etc...
373
374 This job runs a Maven build and deploys to $WORKSPACE/m2repo directory. This
375 directory is then used later to deploy to Nexus.
376
377 :Template Names:
378
379     - {project-name}-maven-stage-{stream}
380     - gerrit-maven-stage
381     - github-maven-stage
382
383 :Comment Trigger: "stage-release" or "stage-maven-release"
384
385 :Required parameters:
386
387     :build-node: The node to run build on.
388     :jenkins-ssh-credential: Credential to use for SSH. (Generally configured in defaults.yaml)
389     :mvn-settings: The name of settings file containing credentials for the project.
390     :mvn-staging-id: Maven Server ID from settings.xml to pull credentials from.
391         (Note: This setting is generally configured in ``defaults.yaml``.)
392     :staging-profile-id: Profile ID of the project's Nexus staging profile.
393
394 :Optional parameters:
395
396     :archive-artifacts: Artifacts to archive to the logs server (default: '').
397     :branch: The branch to build against. (default: master)
398     :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
399     :build-timeout: Timeout in minutes before aborting build. (default: 60)
400     :cron: Cron schedule when to trigger the job. This parameter also
401         supports multiline input via YAML pipe | character in cases where
402         one may want to provide more than 1 cron timer. (default: '')
403     :deploy-path:    The path in Nexus to deploy javadoc to. (default: $PROJECT/$STREAM)
404     :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
405     :java-version: Version of Java to use for the build. (default: openjdk11)
406     :mvn-central: Set to ``true`` to also stage to **OSSRH**. This is for projects
407         that want to release to Maven Central. If set, then also set the parameter
408         ``ossrh-profile-id``. (default: false)
409     :maven-versions-plugin: Whether to call Maven versions plugin or not. (default: false)
410     :mvn-global-settings: The name of the Maven global settings to use for
411         Maven configuration. (default: global-settings)
412     :mvn-opts: Sets MAVEN_OPTS to start up the JVM running Maven. (default: '')
413     :mvn-params: Parameters to pass to the mvn CLI. (default: '')
414     :mvn-version: Version of maven to use. (default: mvn35)
415     :ossrh-profile-id: Profile ID for project as provided by OSSRH.
416         (default: '')
417     :sbom-flags: SBOM generator options if using sbom-generator.
418         See https://github.com/opensbom-generator/spdx-sbom-generator
419     :sbom-generator: Calls lf-infra-maven-sbom-generator to run the SPDX SBOM generator tool.
420         (default: false)
421     :sbom-generator-version: SBOM generator version to download and run if using sbom-generator.
422         (default: v0.0.10)
423     :sbom-path: Path where SBOM is going to be executed from.
424         (default: $WORKSPACE)
425     :sign-artifacts: Sign artifacts with Sigul. (default: false)
426     :stream: Keyword that represents a release code-name.
427         Often the same as the branch. (default: master)
428     :submodule-recursive: Whether to checkout submodules recursively.
429         (default: true)
430     :submodule-timeout: Timeout (in minutes) for checkout operation.
431         (default: 10)
432     :submodule-disable: Disable submodule checkout operation.
433         (default: false)
434     :version-properties-file: Name and path of the version properties file.
435         (default: version.properties)
436
437     :gerrit_release_triggers: Override Gerrit Triggers.
438     :gerrit_trigger_file_paths: Override file paths to filter which file
439         modifications will trigger a build.
440
441 Maven Stage for Docker
442 ----------------------
443
444 Produces a release candidate docker image in a Nexus registry.
445 Appropriate for Java projects that do not need to deploy any POM or
446 JAR files.
447
448 Like the Maven Stage job as described above but logs in to Docker
449 registries first and skips the lf-maven-deploy builder. The project
450 POM file should invoke a plugin to build and push a Docker image.
451 This pulls the base image from the registry in the environment
452 variable ``CONTAINER_PULL_REGISTRY`` and pushes new image into the
453 registry in the environment variable ``CONTAINER_PUSH_REGISTRY``.
454
455 :Template Names:
456
457     - {project-name}-maven-docker-stage-{stream}
458     - gerrit-maven-docker-stage
459     - github-maven-docker-stage
460
461 :Comment Trigger: "stage-release" or "stage-docker-release"
462
463 :Required parameters:
464
465     :container-public-registry: Docker registry source with base images.
466     :container-staging-registry: Docker registry target for the deploy action.
467
468 :Optional parameters:
469
470     :gerrit_release_docker_triggers: Override Gerrit Triggers.
471
472 All other required and optional parameters are identical to the Maven Stage job
473 described above.
474
475 .. _maven-sonar:
476
477 Maven Sonar
478 -----------
479
480 Sonar job which runs mvn clean install then publishes to Sonar.
481
482 This job purposely runs on the ``master`` branch and does not support
483 multi-branch configuration.
484
485 :Template Names:
486
487     - {project-name}-sonar
488     - gerrit-maven-sonar
489     - github-maven-sonar
490     - {project-name}-sonar-prescan-script
491     - gerrit-maven-sonar-prescan-script
492     - github-maven-sonar-prescan-script
493
494 :Comment Trigger: run-sonar
495
496 :Required parameters:
497
498     :build-node: The node to run build on.
499     :jenkins-ssh-credential: Credential to use for SSH. (Generally configured in defaults.yaml)
500     :mvn-settings: The name of settings file containing credentials for the project.
501     :sonar-prescan-script: (maven-sonar-prescan-script jobs) A shell script to run before
502         sonar scans.
503
504 :Optional parameters:
505
506     :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
507     :build-timeout: Timeout in minutes before aborting build. (default: 60)
508     :cron: Cron schedule when to trigger the job. This parameter also
509         supports multiline input via YAML pipe | character in cases where
510         one may want to provide more than 1 cron timer.  (default: 'H H * * 6'
511         to run weekly)
512     :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
513     :java-version: Version of Java to use for the Maven build. (default: openjdk11)
514     :mvn-global-settings: The name of the Maven global settings to use for
515         Maven configuration. (default: global-settings)
516     :mvn-goals: The maven goals to perform for the build.
517         (default: clean install)
518     :mvn-opts: Sets MAVEN_OPTS to start up the JVM running Maven. (default: '')
519     :mvn-params: Parameters to pass to the mvn CLI. (default: '')
520     :mvn-version: Version of maven to use. (default: mvn35)
521     :sonar-mvn-goals: Maven goals to run for sonar analysis.
522         (default: sonar:sonar)
523     :sonarcloud: Set to ``true`` to use SonarCloud ``true|false``.
524         (default: false)
525     :sonarcloud-project-key: SonarCloud project key. (default: '')
526     :sonarcloud-project-organization: SonarCloud project organization.
527         (default: '')
528     :sonarcloud-api-token-cred-id: Jenkins credential ID which has the SonarCloud API Token.
529         This one SHOULDN'T be overwritten as per we are standarizing the credential ID for all
530         projects (default: 'sonarcloud-api-token')
531     :sonarcloud-java-version: Version of Java to use for the Sonar scan. (default: openjdk11)
532     :stream: Keyword that represents a release code-name.
533         Often the same as the branch. (default: master)
534     :submodule-recursive: Whether to checkout submodules recursively.
535         (default: true)
536     :submodule-timeout: Timeout (in minutes) for checkout operation.
537         (default: 10)
538     :submodule-disable: Disable submodule checkout operation.
539         (default: false)
540     :scan-dev-branch: Run the scan on a developer branch.
541         (default: false)
542
543     :gerrit_sonar_triggers: Override Gerrit Triggers.
544
545
546 SonarCloud Example:
547
548 .. literalinclude:: ../../.jjb-test/lf-maven-jobs/maven-sonarcloud.yaml
549    :language: yaml
550
551 Maven Sonar Verify
552 ------------------
553
554 Sonar job which runs mvn clean install then publishes to Sonar.
555
556 This job runs on dev branches and its triggered on new patchsets.
557
558 :Template Names:
559
560     - {project-name}-sonar-verify
561     - gerrit-maven-sonar-verify
562
563 :Comment Trigger: recheck|reverify
564
565 :Required parameters:
566
567     :build-node: The node to run build on.
568     :jenkins-ssh-credential: Credential to use for SSH. (Generally configured in defaults.yaml)
569     :mvn-settings: The name of settings file containing credentials for the project.
570
571 :Optional parameters:
572
573     :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
574     :build-timeout: Timeout in minutes before aborting build. (default: 60)
575     :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
576     :java-version: Version of Java to use for the Maven build. (default: openjdk11)
577     :mvn-global-settings: The name of the Maven global settings to use for
578         Maven configuration. (default: global-settings)
579     :mvn-goals: The maven goals to perform for the build.
580         (default: clean install)
581     :mvn-opts: Sets MAVEN_OPTS to start up the JVM running Maven. (default: '')
582     :mvn-params: Parameters to pass to the mvn CLI. (default: '')
583     :mvn-version: Version of maven to use. (default: mvn35)
584     :pre-build-script: Shell script to run before maven build. (default: a string with a shell comment)
585     :post-build-script: Shell script to run after maven build. (default: a string with a shell comment)
586     :sonar-mvn-goal: Maven goals to run for sonar analysis.
587         (default: sonar:sonar)
588     :sonarcloud: Set to ``true`` to use SonarCloud ``true|false``.
589         (default: true)
590     :sonarcloud-project-key: SonarCloud project key. (default: '')
591     :sonarcloud-project-organization: SonarCloud project organization.
592         (default: '')
593     :sonarcloud-api-token-cred-id: Jenkins credential ID which has the SonarCloud API Token.
594         This one SHOULDN'T be overwritten as per we are standarizing the credential ID for all
595         projects (default: 'sonarcloud-api-token')
596     :sonarcloud-java-version: Version of Java to use for the Sonar scan. (default: openjdk11)
597     :sonarcloud-qualitygate-wait: SonarCloud flag that forces the analysis step to
598         wait for the quality gate result. (default: false)
599     :stream: Keyword that represents a release code-name.
600         Often the same as the branch. (default: master)
601     :submodule-recursive: Whether to checkout submodules recursively.
602         (default: true)
603     :submodule-timeout: Timeout (in minutes) for checkout operation.
604         (default: 10)
605     :submodule-disable: Disable submodule checkout operation.
606         (default: false)
607     :scan-dev-branch: Run the scan on a developer branch.
608         (default: true)
609
610     :gerrit_sonar_triggers: Override Gerrit Triggers.
611
612
613 SonarCloud Example:
614
615 .. literalinclude:: ../../.jjb-test/lf-maven-jobs/maven-sonarcloud.yaml
616    :language: yaml
617
618 Maven Verify
619 ------------
620
621 Verify job which runs mvn clean install to test a project build..
622
623 :Template Names:
624
625     - {project-name}-maven-verify-{stream}-{mvn-version}-{java-version}
626     - gerrit-maven-verify
627     - github-maven-verify
628
629 :Comment Trigger: recheck|reverify
630
631 :Required parameters:
632
633     :build-node: The node to run build on.
634     :jenkins-ssh-credential: Credential to use for SSH. (Generally configured in defaults.yaml)
635     :mvn-settings: The name of settings file containing credentials for the project.
636
637 :Optional parameters:
638
639     :branch: Git branch to fetch for the build. (default: master)
640     :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
641     :build-timeout: Timeout in minutes before aborting build. (default: 60)
642     :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
643     :java-version: Version of Java to use for the build. (default: openjdk11)
644     :mvn-global-settings: The name of the Maven global settings to use for
645         Maven configuration. (default: global-settings)
646     :mvn-opts: Sets MAVEN_OPTS to start up the JVM running Maven. (default: '')
647     :mvn-params: Parameters to pass to the mvn CLI. (default: '')
648     :mvn-version: Version of maven to use. (default: mvn35)
649     :stream: Keyword that represents a release code-name.
650         Often the same as the branch. (default: master)
651     :submodule-recursive: Whether to checkout submodules recursively.
652         (default: true)
653     :submodule-timeout: Timeout (in minutes) for checkout operation.
654         (default: 10)
655     :submodule-disable: Disable submodule checkout operation.
656         (default: false)
657
658     :gerrit_verify_triggers: Override Gerrit Triggers.
659     :gerrit_trigger_file_paths: Override file paths to filter which file
660         modifications will trigger a build.
661
662 Maven Verify for Docker
663 -----------------------
664
665 Like the Maven Verify job as described above but logs in to Docker
666 registries first. The project POM file should invoke a plugin to build
667 a Docker image. This pulls the base image from the registry in the environment
668 variable ``CONTAINER_PULL_REGISTRY``.
669
670 :Template Names:
671
672     - {project-name}-maven-docker-verify-{stream}-{mvn-version}-{java-version}
673     - gerrit-maven-docker-verify
674     - github-maven-docker-verify
675
676 :Required parameters:
677
678     :container-public-registry: Docker registry source with base images.
679
680 All other required and optional parameters are identical to the Maven Verify job
681 described above.
682
683 Maven Verify w/ Dependencies
684 ----------------------------
685
686 Verify job which runs mvn clean install to test a project build /w deps
687
688 This job's purpose is to verify a patch in conjunction to a list of upstream
689 patches it depends on. The user of this job can provide a list of patches via
690 comment trigger.
691
692 :Template Names:
693
694     - {project-name}-maven-verify-deps-{stream}-{mvn-version}-{java-version}
695     - gerrit-maven-verify-dependencies
696
697 :Comment Trigger: recheck: SPACE_SEPARATED_LIST_OF_PATCHES
698
699 :Required parameters:
700
701     :build-node: The node to run build on.
702     :jenkins-ssh-credential: Credential to use for SSH. (Generally configured in defaults.yaml)
703     :mvn-settings: The name of settings file containing credentials for the project.
704
705 :Optional parameters:
706
707     :branch: Git branch to fetch for the build. (default: master)
708     :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
709     :build-timeout: Timeout in minutes before aborting build. (default: 60)
710     :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
711     :java-version: Version of Java to use for the build. (default: openjdk11)
712     :mvn-global-settings: The name of the Maven global settings to use for
713         Maven configuration. (default: global-settings)
714     :mvn-opts: Sets MAVEN_OPTS to start up the JVM running Maven. (default: '')
715     :mvn-params: Parameters to pass to the mvn CLI. (default: '')
716     :mvn-version: Version of maven to use. (default: mvn35)
717     :stream: Keyword that represents a release code-name.
718         Often the same as the branch. (default: master)
719     :submodule-recursive: Whether to checkout submodules recursively.
720         (default: true)
721     :submodule-timeout: Timeout (in minutes) for checkout operation.
722         (default: 10)
723     :submodule-disable: Disable submodule checkout operation.
724         (default: false)
725
726     :gerrit_verify_triggers: Override Gerrit Triggers.
727     :gerrit_trigger_file_paths: Override file paths to filter which file
728         modifications will trigger a build.