From 98684f45f78da5452f8f682b62daf1a2dd84ab50 Mon Sep 17 00:00:00 2001 From: LiuJingBo Date: Wed, 9 Dec 2020 21:49:38 +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 a6df2ead..c9b272f4 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 = 'liujingbo1023' + GITHUB_ACCOUNT = 'liujingbo1023@163.com' APP_NAME = 'devops-java-sample' + SONAR_CREDENTIAL_ID = 'sonar-qube' } stages { From 348c3c14d1e6739cdc7a3f68da8d01f0da643fbb Mon Sep 17 00:00:00 2001 From: LiuJingBo Date: Wed, 9 Dec 2020 21:53:02 +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 c9b272f4..a1118e7c 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 03be5ba66efec10fb613cb7cc9fb37bbcba9e77a Mon Sep 17 00:00:00 2001 From: LiuJingBo Date: Wed, 9 Dec 2020 22:14:34 +0800 Subject: [PATCH 3/3] Update Jenkinsfile-online --- Jenkinsfile-online | 1 - 1 file changed, 1 deletion(-) diff --git a/Jenkinsfile-online b/Jenkinsfile-online index a1118e7c..6f8799ed 100644 --- a/Jenkinsfile-online +++ b/Jenkinsfile-online @@ -17,7 +17,6 @@ pipeline { DOCKERHUB_NAMESPACE = 'liujingbo1023' GITHUB_ACCOUNT = 'liujingbo1023@163.com' APP_NAME = 'devops-java-sample' - SONAR_CREDENTIAL_ID = 'sonar-qube' } stages {