From a7340ced6e5458aec3c0cfa4c602d1bc17f2c88e Mon Sep 17 00:00:00 2001 From: IFADA <30401880+IFADA@users.noreply.github.com> Date: Thu, 15 Oct 2020 07:46:39 +0800 Subject: [PATCH 1/2] Update Jenkinsfile-online --- Jenkinsfile-online | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile-online b/Jenkinsfile-online index a6df2ead..8c1e5386 100644 --- a/Jenkinsfile-online +++ b/Jenkinsfile-online @@ -14,8 +14,8 @@ pipeline { GITHUB_CREDENTIAL_ID = 'github-id' KUBECONFIG_CREDENTIAL_ID = 'demo-kubeconfig' REGISTRY = 'docker.io' - DOCKERHUB_NAMESPACE = 'docker_username' - GITHUB_ACCOUNT = 'kubesphere' + DOCKERHUB_NAMESPACE = 'IFADA' + GITHUB_ACCOUNT = 'IFADA' APP_NAME = 'devops-java-sample' } From e16b1e3b8625d6955a81f2bb3da0c009ff421c88 Mon Sep 17 00:00:00 2001 From: IFADA <30401880+IFADA@users.noreply.github.com> Date: Thu, 15 Oct 2020 07:50:51 +0800 Subject: [PATCH 2/2] Update Jenkinsfile-online --- Jenkinsfile-online | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile-online b/Jenkinsfile-online index 8c1e5386..4d25d3dd 100644 --- a/Jenkinsfile-online +++ b/Jenkinsfile-online @@ -29,7 +29,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' } } } @@ -37,7 +37,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'