Add support for SonarCloud
[releng/global-jjb.git] / docs / jjb / lf-maven-jobs.rst
index 25258ae..aca0f5f 100644 (file)
@@ -27,6 +27,20 @@ Runs Sonar against a Maven project.
     :mvn-version: Version of Maven to execute Sonar with.
     :mvn-settings: Maven settings.xml file containing credentials to use.
 
+lf-infra-maven-sonarcloud
+-------------------------
+
+Runs Sonar against a Maven project and pushes results to SonarCloud.
+
+:Required Parameters:
+
+    :java-version: Version of Java to execute Sonar with.
+    :mvn-version: Version of Maven to execute Sonar with.
+    :mvn-settings: Maven settings.xml file containing credentials to use.
+    :sonarcloud-project-key: SonarCloud project key.
+    :sonarcloud-project-organization: SonarCloud project organization.
+    :sonarcloud-api-token: SonarCloud API Token.
+
 lf-maven-build
 --------------
 
@@ -324,6 +338,8 @@ directory is then used later to deploy to Nexus.
 
     :gerrit_release_triggers: Override Gerrit Triggers.
 
+.. _maven-sonar:
+
 Maven Sonar
 -----------
 
@@ -363,6 +379,14 @@ interest in that kind of support.
     :mvn-opts: Sets MAVEN_OPTS. (default: '')
     :mvn-params: Additional mvn parameters to pass to the cli. (default: '')
     :mvn-version: Version of maven to use. (default: mvn35)
+    :sonar-mvn-goals: Maven goals to run for sonar analysis.
+        (default: sonar:sonar)
+    :sonarcloud: Whether or not to use SonarCloud ``true|false``.
+        (default: false)
+    :sonarcloud-project-key: SonarCloud project key. (default: '')
+    :sonarcloud-project-organization: SonarCloud project organization.
+        (default: '')
+    :sonarcloud-api-token: SonarCloud API Token. (default: '')
     :stream: Keyword that can be used to represent a release code-name.
         Often the same as the branch. (default: master)
     :submodule-recursive: Whether to checkout submodules recursively.
@@ -372,6 +396,12 @@ interest in that kind of support.
 
     :gerrit_sonar_triggers: Override Gerrit Triggers.
 
+
+SonarCloud Example:
+
+.. literalinclude:: ../../.jjb-test/lf-maven-jobs/maven-sonarcloud.yaml
+   :language: yaml
+
 Maven Verify
 ------------