From cba76bfe00f76d3853620c64f8b3a9b6ac2d9f40 Mon Sep 17 00:00:00 2001 From: 850737895 <850737895@qq.com> Date: Wed, 2 Mar 2022 22:37:03 +0800 Subject: [PATCH 1/2] Update Jenkinsfile-online MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修改凭证信息 --- Jenkinsfile-online | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile-online b/Jenkinsfile-online index 2ca69e7f..f2ef967e 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 = '17373965471' + GITHUB_ACCOUNT = '850737895' APP_NAME = 'devops-java-sample' + SONAR_CREDENTIAL_ID= 'sonarqube' } stages { @@ -36,7 +37,7 @@ pipeline { stage ('build & push') { steps { - container ('maven') { +x container ('maven') { 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" ,)]) { From dd2b6ba93aac839d3a5d932d918495f633c8ed20 Mon Sep 17 00:00:00 2001 From: 850737895 <850737895@qq.com> Date: Wed, 2 Mar 2022 22:37:29 +0800 Subject: [PATCH 2/2] Update Jenkinsfile-online --- Jenkinsfile-online | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile-online b/Jenkinsfile-online index f2ef967e..2404701d 100644 --- a/Jenkinsfile-online +++ b/Jenkinsfile-online @@ -37,7 +37,7 @@ pipeline { stage ('build & push') { steps { -x container ('maven') { + container ('maven') { 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" ,)]) {