Skip to content

Commit

Permalink
Add Sonarqube quality check
Browse files Browse the repository at this point in the history
  • Loading branch information
fpapon committed Sep 20, 2020
1 parent df227ac commit a10e800
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
* limitations under the License.
*
*/
def sonarcloudParams="-Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=apache -Dsonar.projectKey=apache_shiro"

pipeline {

Expand Down Expand Up @@ -89,6 +90,15 @@ pipeline {
}
}

stage('Code Quality') {
steps {
echo 'Checking Code Quality on SonarCloud'
withCredentials([string(credentialsId: '0d21ea2cf02d607fd20fa4101a715242f2f612a8', variable: 'SONAR_TOKEN')]) {
sh 'mvn sonar:sonar ${sonarcloudParams} -Dsonar.branch.name=${BRANCH_NAME} -Dsonar.login=${SONAR_TOKEN}'
}
}
}

stage('Generate doc') {
when {
expression {
Expand Down

0 comments on commit a10e800

Please sign in to comment.