From f3455b04033721364e4ab069e2f5a5f56a347456 Mon Sep 17 00:00:00 2001 From: runzexia Date: Thu, 11 Apr 2019 14:26:17 +0800 Subject: [PATCH 1/9] Update HelloWorldController.java --- src/main/java/io/kubesphere/devops/HelloWorldController.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/io/kubesphere/devops/HelloWorldController.java b/src/main/java/io/kubesphere/devops/HelloWorldController.java index 9534dc9d..ef01c4b9 100644 --- a/src/main/java/io/kubesphere/devops/HelloWorldController.java +++ b/src/main/java/io/kubesphere/devops/HelloWorldController.java @@ -14,6 +14,6 @@ public class HelloWorldController { @RequestMapping("/") public String sayHello() { - return "Hello,World!"; + return "Hello,KubeSphere!"; } -} \ No newline at end of file +} From 200a88836a202a1903f6af258b7b061e45b67a78 Mon Sep 17 00:00:00 2001 From: runzexia Date: Thu, 11 Apr 2019 15:41:08 +0800 Subject: [PATCH 2/9] Update Jenkinsfile-online --- Jenkinsfile-online | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile-online b/Jenkinsfile-online index 1b49cae4..5ef87239 100644 --- a/Jenkinsfile-online +++ b/Jenkinsfile-online @@ -38,8 +38,10 @@ pipeline { stage('sonarqube analysis') { steps { container ('maven') { - withSonarQubeEnv('sonar') { - sh "mvn sonar:sonar -o -gs `pwd`/configuration/settings.xml -Dsonar.branch=$BRANCH_NAME -Dsonar.login=$SONAR_TOKEN_ID" + withCredentials([string(credentialsId: "$SONAR_TOKEN_ID", variable: 'SONAR_TOKEN')]) { + withSonarQubeEnv('sonar') { + sh "${scannerHome}/bin/sonar-scanner -Dsonar.projectKey=ks-devops -Dsonar.sources=. -Dsonar.login=$SONAR_TOKEN" + } } timeout(time: 1, unit: 'HOURS') { waitForQualityGate abortPipeline: true From 11f72494e9ad11a13b7ba4326dd9fa4a5af34af4 Mon Sep 17 00:00:00 2001 From: runzexia Date: Thu, 11 Apr 2019 15:43:48 +0800 Subject: [PATCH 3/9] Update HelloWorldController.java --- src/main/java/io/kubesphere/devops/HelloWorldController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/io/kubesphere/devops/HelloWorldController.java b/src/main/java/io/kubesphere/devops/HelloWorldController.java index ef01c4b9..ade8c5bf 100644 --- a/src/main/java/io/kubesphere/devops/HelloWorldController.java +++ b/src/main/java/io/kubesphere/devops/HelloWorldController.java @@ -14,6 +14,6 @@ public class HelloWorldController { @RequestMapping("/") public String sayHello() { - return "Hello,KubeSphere!"; + return "Hello,World!"; } } From 6a17ef8df02be04d1807f0dae94b47f13f028d04 Mon Sep 17 00:00:00 2001 From: runzexia Date: Thu, 11 Apr 2019 15:45:34 +0800 Subject: [PATCH 4/9] Update Jenkinsfile-online --- Jenkinsfile-online | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile-online b/Jenkinsfile-online index 5ef87239..9730603d 100644 --- a/Jenkinsfile-online +++ b/Jenkinsfile-online @@ -40,7 +40,7 @@ pipeline { container ('maven') { withCredentials([string(credentialsId: "$SONAR_TOKEN_ID", variable: 'SONAR_TOKEN')]) { withSonarQubeEnv('sonar') { - sh "${scannerHome}/bin/sonar-scanner -Dsonar.projectKey=ks-devops -Dsonar.sources=. -Dsonar.login=$SONAR_TOKEN" + sh "mvn sonar:sonar -o -gs `pwd`/configuration/settings.xml -Dsonar.branch=$BRANCH_NAME -Dsonar.login=$SONAR_TOKEN_ID" } } timeout(time: 1, unit: 'HOURS') { From f1aec2d41eabfc6f69c5fd1e459f61d316d8da31 Mon Sep 17 00:00:00 2001 From: runzexia Date: Thu, 11 Apr 2019 15:46:28 +0800 Subject: [PATCH 5/9] Update Jenkinsfile --- Jenkinsfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 7a3501bb..f74a02c9 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -38,8 +38,10 @@ pipeline { stage('sonarqube analysis') { steps { container ('maven') { - withSonarQubeEnv('sonar') { - sh "mvn sonar:sonar -o -gs `pwd`/configuration/settings.xml -Dsonar.branch=$BRANCH_NAME -Dsonar.login=$SONAR_TOKEN_ID" + withCredentials([string(credentialsId: "$SONAR_TOKEN_ID", variable: 'SONAR_TOKEN')]) { + withSonarQubeEnv('sonar') { + sh "mvn sonar:sonar -o -gs `pwd`/configuration/settings.xml -Dsonar.branch=$BRANCH_NAME -Dsonar.login=$SONAR_TOKEN_ID" + } } timeout(time: 1, unit: 'HOURS') { waitForQualityGate abortPipeline: true From 3339f3bb22ec2efa672d2dbc601633f1b81bd4ad Mon Sep 17 00:00:00 2001 From: runzexia Date: Thu, 11 Apr 2019 15:50:02 +0800 Subject: [PATCH 6/9] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index f74a02c9..08b28d0d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -40,7 +40,7 @@ pipeline { container ('maven') { withCredentials([string(credentialsId: "$SONAR_TOKEN_ID", variable: 'SONAR_TOKEN')]) { withSonarQubeEnv('sonar') { - sh "mvn sonar:sonar -o -gs `pwd`/configuration/settings.xml -Dsonar.branch=$BRANCH_NAME -Dsonar.login=$SONAR_TOKEN_ID" + sh "mvn sonar:sonar -o -gs `pwd`/configuration/settings.xml -Dsonar.branch=$BRANCH_NAME -Dsonar.login=$SONAR_TOKEN" } } timeout(time: 1, unit: 'HOURS') { From 6ee6458e3c9268dc298ee36a48a2cfc26889db7d Mon Sep 17 00:00:00 2001 From: runzexia Date: Thu, 11 Apr 2019 15:50:19 +0800 Subject: [PATCH 7/9] Update Jenkinsfile-online --- Jenkinsfile-online | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile-online b/Jenkinsfile-online index 9730603d..61878d3d 100644 --- a/Jenkinsfile-online +++ b/Jenkinsfile-online @@ -40,7 +40,7 @@ pipeline { container ('maven') { withCredentials([string(credentialsId: "$SONAR_TOKEN_ID", variable: 'SONAR_TOKEN')]) { withSonarQubeEnv('sonar') { - sh "mvn sonar:sonar -o -gs `pwd`/configuration/settings.xml -Dsonar.branch=$BRANCH_NAME -Dsonar.login=$SONAR_TOKEN_ID" + sh "mvn sonar:sonar -o -gs `pwd`/configuration/settings.xml -Dsonar.branch=$BRANCH_NAME -Dsonar.login=$SONAR_TOKEN" } } timeout(time: 1, unit: 'HOURS') { From 2fa28660704277a99de457d098dbfc07673db2e8 Mon Sep 17 00:00:00 2001 From: runzexia Date: Thu, 11 Apr 2019 16:04:31 +0800 Subject: [PATCH 8/9] Update Jenkinsfile --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 08b28d0d..e108176e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -17,7 +17,7 @@ pipeline { NAMESPACE = 'library' GITLAB_ACCOUNT = 'admin1' APP_NAME = 'devops-sample-s2i' - SONAR_TOKEN_ID= 'sonar-token' + SONAR_CREDENTIAL_ID= 'sonar-token' } stages { @@ -38,7 +38,7 @@ pipeline { stage('sonarqube analysis') { steps { container ('maven') { - withCredentials([string(credentialsId: "$SONAR_TOKEN_ID", variable: 'SONAR_TOKEN')]) { + 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" } From e37687e9732df016d20f9be672fb47d4d263a441 Mon Sep 17 00:00:00 2001 From: runzexia Date: Thu, 11 Apr 2019 16:05:11 +0800 Subject: [PATCH 9/9] Update Jenkinsfile-online --- Jenkinsfile-online | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile-online b/Jenkinsfile-online index 61878d3d..d13d093a 100644 --- a/Jenkinsfile-online +++ b/Jenkinsfile-online @@ -17,7 +17,7 @@ pipeline { NAMESPACE = 'docker_username' GITHUB_ACCOUNT = 'kubesphere' APP_NAME = 'devops-sample-s2i' - SONAR_TOKEN_ID= 'sonar-token' + SONAR_CREDENTIAL_ID= 'sonar-token' } stages { @@ -38,7 +38,7 @@ pipeline { stage('sonarqube analysis') { steps { container ('maven') { - withCredentials([string(credentialsId: "$SONAR_TOKEN_ID", variable: 'SONAR_TOKEN')]) { + 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" }