From 14fcaf5cdc876524db793b4f5107b1ac38556c94 Mon Sep 17 00:00:00 2001 From: fsjwin Date: Wed, 23 Sep 2020 20:26:57 +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..ba8fd628 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 = 'yuhongliang666' + GITHUB_ACCOUNT = 'fsjwin' APP_NAME = 'devops-java-sample' + SONAR_CREDENTIAL_ID = 'sonar-token' } stages { From e46de42ea6a176629c693d4a24982df0979365af Mon Sep 17 00:00:00 2001 From: fsjwin Date: Wed, 23 Sep 2020 20:30:00 +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 ba8fd628..291a4f1c 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 35b5915555d4a179ecbb12703cd721b7a309f5d9 Mon Sep 17 00:00:00 2001 From: fsjwin Date: Wed, 23 Sep 2020 21:03:21 +0800 Subject: [PATCH 3/3] Update pom.xml --- pom.xml | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/pom.xml b/pom.xml index 69717e7e..b53780f5 100644 --- a/pom.xml +++ b/pom.xml @@ -24,30 +24,9 @@ org.springframework.boot spring-boot-starter-parent - 1.4.1.BUILD-SNAPSHOT + 2.1.17.RELEASE - - - spring-snapshots - http://repo.spring.io/snapshot - true - - - spring-milestones - http://repo.spring.io/milestone - - - - - spring-snapshots - http://repo.spring.io/snapshot - - - spring-milestones - http://repo.spring.io/milestone - - @@ -106,4 +85,4 @@ - \ No newline at end of file +