From f39530ea5476a31a1d5c3344419692d677bfc712 Mon Sep 17 00:00:00 2001 From: Francois Papon Date: Sun, 20 Sep 2020 18:36:52 +0200 Subject: [PATCH] Add Sonarqube quality check --- Jenkinsfile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index fc7e01f36a..81a93ca7a8 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -18,7 +18,6 @@ * limitations under the License. * */ - pipeline { agent { @@ -89,6 +88,15 @@ pipeline { } } + stage('Code Quality') { + steps { + echo 'Checking Code Quality on SonarCloud' + withCredentials([string(credentialsId: 'sonarcloud-key-apache-shiro', variable: 'SONAR_TOKEN')]) { + sh 'mvn sonar:sonar -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=apache -Dsonar.projectKey=apache_shiro -Dsonar.branch.name=${BRANCH_NAME} -Dsonar.login=${SONAR_TOKEN}' + } + } + } + stage('Generate doc') { when { expression {