diff --git a/Jenkinsfile-on-prem b/Jenkinsfile-on-prem index 1a47ed52..b76a9ccb 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 dec0cebf..a6df2ead 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') {