From 271668f6eabfc216c1de0809901ef68c8bf003be Mon Sep 17 00:00:00 2001 From: huanggze Date: Sat, 25 Jul 2020 10:00:28 +0800 Subject: [PATCH] remove sonarqube analysis stage Signed-off-by: huanggze --- Jenkinsfile-on-prem | 16 ---------------- Jenkinsfile-online | 16 ---------------- 2 files changed, 32 deletions(-) diff --git a/Jenkinsfile-on-prem b/Jenkinsfile-on-prem index 1a47ed5..b76a9cc 100644 --- a/Jenkinsfile-on-prem +++ b/Jenkinsfile-on-prem @@ -17,7 +17,6 @@ pipeline { HARBOR_NAMESPACE = 'library' GITLAB_ACCOUNT = 'admin1' APP_NAME = 'devops-java-sample' - SONAR_CREDENTIAL_ID= 'sonar-token' } stages { @@ -35,21 +34,6 @@ pipeline { } } - stage('sonarqube analysis') { - steps { - container ('maven') { - withCredentials([string(credentialsId: "$SONAR_CREDENTIAL_ID", variable: 'SONAR_TOKEN')]) { - withSonarQubeEnv('sonar') { - sh "mvn sonar:sonar -o -gs `pwd`/configuration/settings.xml -Dsonar.branch=$BRANCH_NAME -Dsonar.login=$SONAR_TOKEN" - } - } - timeout(time: 1, unit: 'HOURS') { - waitForQualityGate abortPipeline: true - } - } - } - } - stage ('build & push') { steps { container ('maven') { diff --git a/Jenkinsfile-online b/Jenkinsfile-online index dec0ceb..a6df2ea 100644 --- a/Jenkinsfile-online +++ b/Jenkinsfile-online @@ -17,7 +17,6 @@ pipeline { DOCKERHUB_NAMESPACE = 'docker_username' GITHUB_ACCOUNT = 'kubesphere' APP_NAME = 'devops-java-sample' - SONAR_CREDENTIAL_ID = 'sonar-token' } stages { @@ -35,21 +34,6 @@ pipeline { } } - stage('sonarqube analysis') { - steps { - container ('maven') { - withCredentials([string(credentialsId: "$SONAR_CREDENTIAL_ID", variable: 'SONAR_TOKEN')]) { - withSonarQubeEnv('sonar') { - sh "mvn sonar:sonar -o -gs `pwd`/configuration/settings.xml -Dsonar.branch=$BRANCH_NAME -Dsonar.login=$SONAR_TOKEN" - } - } - timeout(time: 1, unit: 'HOURS') { - waitForQualityGate abortPipeline: true - } - } - } - } - stage ('build & push') { steps { container ('maven') {