From 1e7669212bf8d2bde983c99fa893eb705ccda39f Mon Sep 17 00:00:00 2001 From: yingmd Date: Tue, 8 Dec 2020 08:42:55 +0800 Subject: [PATCH 1/3] Update Jenkinsfile-online --- Jenkinsfile-online | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile-online b/Jenkinsfile-online index a6df2ead1..544e8be4a 100644 --- a/Jenkinsfile-online +++ b/Jenkinsfile-online @@ -14,9 +14,10 @@ pipeline { GITHUB_CREDENTIAL_ID = 'github-id' KUBECONFIG_CREDENTIAL_ID = 'demo-kubeconfig' REGISTRY = 'docker.io' - DOCKERHUB_NAMESPACE = 'docker_username' - GITHUB_ACCOUNT = 'kubesphere' + DOCKERHUB_NAMESPACE = 'yingmd' + GITHUB_ACCOUNT = 'yingmd' APP_NAME = 'devops-java-sample' + SONAR_CREDENTIAL = 'sonar-sonar-qube' } stages { From 3f2650b84cefc1fc51b07f4f6be2071074579da6 Mon Sep 17 00:00:00 2001 From: yingmd Date: Tue, 8 Dec 2020 08:53:16 +0800 Subject: [PATCH 2/3] Update Jenkinsfile-online --- Jenkinsfile-online | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile-online b/Jenkinsfile-online index 544e8be4a..69e5ce8e0 100644 --- a/Jenkinsfile-online +++ b/Jenkinsfile-online @@ -30,7 +30,7 @@ pipeline { stage ('unit test') { steps { container ('maven') { - sh 'mvn clean -o -gs `pwd`/configuration/settings.xml test' + sh 'mvn clean -gs `pwd`/configuration/settings.xml test' } } } @@ -38,7 +38,7 @@ pipeline { stage ('build & push') { steps { container ('maven') { - sh 'mvn -o -Dmaven.test.skip=true -gs `pwd`/configuration/settings.xml clean package' + sh 'mvn -Dmaven.test.skip=true -gs `pwd`/configuration/settings.xml clean package' sh 'docker build -f Dockerfile-online -t $REGISTRY/$DOCKERHUB_NAMESPACE/$APP_NAME:SNAPSHOT-$BRANCH_NAME-$BUILD_NUMBER .' withCredentials([usernamePassword(passwordVariable : 'DOCKER_PASSWORD' ,usernameVariable : 'DOCKER_USERNAME' ,credentialsId : "$DOCKER_CREDENTIAL_ID" ,)]) { sh 'echo "$DOCKER_PASSWORD" | docker login $REGISTRY -u "$DOCKER_USERNAME" --password-stdin' From 5148c66cf629379bc0ac313317fcdd8939f31e64 Mon Sep 17 00:00:00 2001 From: yingmd Date: Wed, 9 Dec 2020 14:18:17 +0800 Subject: [PATCH 3/3] Update Jenkinsfile-online --- Jenkinsfile-online | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile-online b/Jenkinsfile-online index 69e5ce8e0..788a4372c 100644 --- a/Jenkinsfile-online +++ b/Jenkinsfile-online @@ -17,7 +17,7 @@ pipeline { DOCKERHUB_NAMESPACE = 'yingmd' GITHUB_ACCOUNT = 'yingmd' APP_NAME = 'devops-java-sample' - SONAR_CREDENTIAL = 'sonar-sonar-qube' + SONAR_CREDENTIAL_ID= 'sonar-token' } stages {