Skip to content

Commit fd10036

Browse files
author
huanggze
committed
remove sonarqube analysis stage
Signed-off-by: huanggze <loganhuang@yunify.com>
1 parent b5fa900 commit fd10036

File tree

2 files changed

+0
-32
lines changed

2 files changed

+0
-32
lines changed

Jenkinsfile-on-prem

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ pipeline {
1717
HARBOR_NAMESPACE = 'library'
1818
GITLAB_ACCOUNT = 'admin1'
1919
APP_NAME = 'devops-java-sample'
20-
SONAR_CREDENTIAL_ID= 'sonar-token'
2120
}
2221

2322
stages {
@@ -35,21 +34,6 @@ pipeline {
3534
}
3635
}
3736

38-
stage('sonarqube analysis') {
39-
steps {
40-
container ('maven') {
41-
withCredentials([string(credentialsId: "$SONAR_CREDENTIAL_ID", variable: 'SONAR_TOKEN')]) {
42-
withSonarQubeEnv('sonar') {
43-
sh "mvn sonar:sonar -o -gs `pwd`/configuration/settings.xml -Dsonar.branch=$BRANCH_NAME -Dsonar.login=$SONAR_TOKEN"
44-
}
45-
}
46-
timeout(time: 1, unit: 'HOURS') {
47-
waitForQualityGate abortPipeline: true
48-
}
49-
}
50-
}
51-
}
52-
5337
stage ('build & push') {
5438
steps {
5539
container ('maven') {

Jenkinsfile-online

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ pipeline {
1717
DOCKERHUB_NAMESPACE = 'docker_username'
1818
GITHUB_ACCOUNT = 'kubesphere'
1919
APP_NAME = 'devops-java-sample'
20-
SONAR_CREDENTIAL_ID = 'sonar-token'
2120
}
2221

2322
stages {
@@ -35,21 +34,6 @@ pipeline {
3534
}
3635
}
3736

38-
stage('sonarqube analysis') {
39-
steps {
40-
container ('maven') {
41-
withCredentials([string(credentialsId: "$SONAR_CREDENTIAL_ID", variable: 'SONAR_TOKEN')]) {
42-
withSonarQubeEnv('sonar') {
43-
sh "mvn sonar:sonar -o -gs `pwd`/configuration/settings.xml -Dsonar.branch=$BRANCH_NAME -Dsonar.login=$SONAR_TOKEN"
44-
}
45-
}
46-
timeout(time: 1, unit: 'HOURS') {
47-
waitForQualityGate abortPipeline: true
48-
}
49-
}
50-
}
51-
}
52-
5337
stage ('build & push') {
5438
steps {
5539
container ('maven') {

0 commit comments

Comments
 (0)