Skip to content
This repository has been archived by the owner on Nov 23, 2021. It is now read-only.

Commit

Permalink
remove sonarqube analysis stage
Browse files Browse the repository at this point in the history
Signed-off-by: huanggze <loganhuang@yunify.com>
  • Loading branch information
huanggze committed Jul 25, 2020
1 parent b5fa900 commit fd10036
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 32 deletions.
16 changes: 0 additions & 16 deletions Jenkinsfile-on-prem
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ pipeline {
HARBOR_NAMESPACE = 'library'
GITLAB_ACCOUNT = 'admin1'
APP_NAME = 'devops-java-sample'
SONAR_CREDENTIAL_ID= 'sonar-token'
}

stages {
Expand All @@ -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') {
Expand Down
16 changes: 0 additions & 16 deletions Jenkinsfile-online
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ pipeline {
DOCKERHUB_NAMESPACE = 'docker_username'
GITHUB_ACCOUNT = 'kubesphere'
APP_NAME = 'devops-java-sample'
SONAR_CREDENTIAL_ID = 'sonar-token'
}

stages {
Expand All @@ -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') {
Expand Down

1 comment on commit fd10036

@fsjwin
Copy link

@fsjwin fsjwin commented on fd10036 Sep 25, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where remove sonarqube analysis stage?

Please sign in to comment.