aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormichaelbirnstiehl <michael.birnstiehl@sonarsource.com>2021-07-22 14:45:55 -0500
committersonartech <sonartech@sonarsource.com>2021-07-24 20:03:16 +0000
commit3bb2b12ce59f08e3164fc8459ac356af0a92db80 (patch)
tree5f2683130d10fd6d24f0ac8b8c66c13e5c1ddb89
parente62396f7c1d7b5267e982f7a200f291ab137387a (diff)
downloadsonarqube-3bb2b12ce59f08e3164fc8459ac356af0a92db80.tar.gz
sonarqube-3bb2b12ce59f08e3164fc8459ac356af0a92db80.zip
SONAR-15141 Fix Jenkins scanner docs formatting for embedded docs
-rw-r--r--server/sonar-docs/src/pages/analysis/scan/sonarscanner-for-jenkins.md8
1 files changed, 7 insertions, 1 deletions
diff --git a/server/sonar-docs/src/pages/analysis/scan/sonarscanner-for-jenkins.md b/server/sonar-docs/src/pages/analysis/scan/sonarscanner-for-jenkins.md
index aa1e0481f37..befdcb546c2 100644
--- a/server/sonar-docs/src/pages/analysis/scan/sonarscanner-for-jenkins.md
+++ b/server/sonar-docs/src/pages/analysis/scan/sonarscanner-for-jenkins.md
@@ -31,7 +31,9 @@ Once the job is complete, the plugin will detect that a SonarQube analysis was m
## Analyzing a .NET solution
**Global Configuration**
+
This step is mandatory if you want to trigger any of your analyses with the SonarScanner for .NET. You can define as many scanner instances as you wish. Then for each Jenkins job, you will be able to choose which launcher to use to run the SonarQube analysis.
+
1. Log into Jenkins as an administrator and go to **Manage Jenkins > Global Tool Configuration**
1. Click on **Add SonarScanner for MSBuild**
1. Add an installation of the latest available version. Check **Install automatically** to have the SonarScanner for MSBuild automatically provisioned on your Jenkins executors
@@ -39,6 +41,7 @@ This step is mandatory if you want to trigger any of your analyses with the Sona
If you do not see any available version under Install from GitHub, first go to Manage Jenkins > Manage Plugins > Advanced and click on Check now
**Job Configuration**
+
1. Configure the project, and go to the **Build** section.
1. Add the SonarQube for MSBuild - Begin Analysis to your build
1. Configure the SonarQube Project Key, Name, and Version in the SonarScanner for MSBuild - Begin Analysis build step
@@ -47,10 +50,12 @@ If you do not see any available version under Install from GitHub, first go to M
## Analyzing a Java project with Maven or Gradle
**Global Configuration**
+
1. Log into Jenkins as an administrator and go to Manage Jenkins > Configure System
1. Scroll to the SonarQube servers section and check Enable injection of SonarQube server configuration as build environment variables
**Job Configuration**
+
1. **Configure** the project, and go to the **Build Environment** section.
1. Enable **Prepare SonarScanner environment** to allow the injection of SonarQube server values into this particular job. If multiple SonarQube instances are configured, you will be able to choose which one to use.
Once the environment variables are available, use them in a standard Maven build step (Invoke top-level Maven targets) by setting the Goals to include, or a standard Gradle build step (Invoke Gradle script) by setting the Tasks to execute.
@@ -76,7 +81,8 @@ This step is mandatory if you want to trigger any of your SonarQube analyses wit
If you don't see a drop-down list with all available SonarScanner versions but instead see an empty text field then this is because Jenkins still hasn't downloaded the required update center file (default period is 1 day). You may force this refresh by clicking the 'Check Now' button in Manage Plugins > Advanced tab.
-**Job Configuration**
+**Job Configuration**
+
1. **Configure** the project, and go to the **Build** section.
1. Add the SonarScanner build step to your build.
1. Configure the SonarQube analysis properties. You can either point to an existing sonar-project.properties file or set the analysis properties directly in the **Analysis properties** field