December 2017
Beginner to intermediate
362 pages
8h 35m
English
The pipeline code to perform static code analysis is a simple shell script that will run the Maven commands, as shown in the following command block. This is made possible using the SonarQube scanner utility for Maven. Remember the configuration that we saw in the Using the SonarQube scanner for Maven section:
sh 'mvn clean verify sonar:sonar -Dsonar.projectName=example-project-Dsonar.projectKey=example-project -Dsonar.projectVersion=$BUILD_NUMBER';
The -Dsonar.projectName=example-project option is the option to pass the SonarQube project name. In this way, all our results will be visible under the projectName=example-project that we created in the previous chapter.
Similarly, the -Dsonar.projectKey=example-project ...
Read now
Unlock full access