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

Commit 6207422

Browse files
authored
yangjzh
1 parent b5fa900 commit 6207422

1 file changed

Lines changed: 5 additions & 18 deletions

File tree

Jenkinsfile-online

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ pipeline {
1010
}
1111

1212
environment {
13-
DOCKER_CREDENTIAL_ID = 'dockerhub-id'
14-
GITHUB_CREDENTIAL_ID = 'github-id'
13+
DOCKER_CREDENTIAL_ID = 'harbor'
14+
GITHUB_CREDENTIAL_ID = 'github'
1515
KUBECONFIG_CREDENTIAL_ID = 'demo-kubeconfig'
16-
REGISTRY = 'docker.io'
17-
DOCKERHUB_NAMESPACE = 'docker_username'
16+
REGISTRY = 'http://192.168.224.194:5001/'
17+
DOCKERHUB_NAMESPACE = 'yangjzh'
1818
GITHUB_ACCOUNT = 'kubesphere'
1919
APP_NAME = 'devops-java-sample'
2020
SONAR_CREDENTIAL_ID = 'sonar-token'
@@ -35,20 +35,7 @@ pipeline {
3535
}
3636
}
3737

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-
}
38+
5239

5340
stage ('build & push') {
5441
steps {

0 commit comments

Comments
 (0)