From ae3e46473e7faf441af4af75b16f419bf3ee17f9 Mon Sep 17 00:00:00 2001 From: csnipe Date: Thu, 31 Dec 2020 09:33:39 +0000 Subject: [PATCH 1/3] Create Jenkinsfile-online --- Jenkinsfile-online | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile-online b/Jenkinsfile-online index a6df2ead1..3bcae00a6 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 = 'csnipe' + GITHUB_ACCOUNT = 'csnipe' APP_NAME = 'devops-java-sample' } From 2682c0d30fcc87ebc5d9adbbaaddfe106556ad56 Mon Sep 17 00:00:00 2001 From: csnipe Date: Thu, 31 Dec 2020 09:35:40 +0000 Subject: [PATCH 2/3] Create Jenkinsfile-online --- Jenkinsfile-online | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile-online b/Jenkinsfile-online index 3bcae00a6..ea2e2137c 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' From 789da4ec3f056bea3df1f1f7493aa9c47042a011 Mon Sep 17 00:00:00 2001 From: csnipe Date: Thu, 31 Dec 2020 10:12:48 +0000 Subject: [PATCH 3/3] Create pom.xml --- pom.xml | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/pom.xml b/pom.xml index 34b527473..75243ad54 100644 --- a/pom.xml +++ b/pom.xml @@ -24,20 +24,9 @@ org.springframework.boot spring-boot-starter-parent - 1.4.1.BUILD-SNAPSHOT + 2.1.13.RELEASE - - - - spring-snapshots - http://repo.spring.io/snapshot - true - - - spring-milestones - http://repo.spring.io/milestone - - + spring-snapshots @@ -106,4 +95,4 @@ - \ No newline at end of file +