From eea0e81c86a3c297e7e1a16a9153e6abdff9e6c9 Mon Sep 17 00:00:00 2001 From: HuoShengLiangIT Date: Wed, 19 Aug 2020 22:59:31 +0800 Subject: [PATCH 1/6] Update Jenkinsfile-online --- Jenkinsfile-online | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile-online b/Jenkinsfile-online index dec0cebff..315872b6a 100644 --- a/Jenkinsfile-online +++ b/Jenkinsfile-online @@ -14,10 +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 = 'hsl19900815' + GITHUB_ACCOUNT = 'hsl_1990_08_15@sina.com' APP_NAME = 'devops-java-sample' - SONAR_CREDENTIAL_ID = 'sonar-token' + SONAR_CREDENTIAL_ID = 'sonarqube-token' } stages { From 3531274ba0a789fb9710fa5324bec29ec12148fa Mon Sep 17 00:00:00 2001 From: HuoShengLiangIT Date: Wed, 19 Aug 2020 23:01:26 +0800 Subject: [PATCH 2/6] Update Jenkinsfile-online --- Jenkinsfile-online | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile-online b/Jenkinsfile-online index 315872b6a..a793f564a 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' } } } @@ -40,7 +40,7 @@ pipeline { container ('maven') { withCredentials([string(credentialsId: "$SONAR_CREDENTIAL_ID", variable: 'SONAR_TOKEN')]) { withSonarQubeEnv('sonar') { - sh "mvn sonar:sonar -o -gs `pwd`/configuration/settings.xml -Dsonar.branch=$BRANCH_NAME -Dsonar.login=$SONAR_TOKEN" + sh "mvn sonar:sonar -gs `pwd`/configuration/settings.xml -Dsonar.branch=$BRANCH_NAME -Dsonar.login=$SONAR_TOKEN" } } timeout(time: 1, unit: 'HOURS') { @@ -53,7 +53,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 d14777a3fec22b531ba1957a90a7a6f6be965b79 Mon Sep 17 00:00:00 2001 From: HuoShengLiangIT Date: Thu, 20 Aug 2020 00:35:45 +0800 Subject: [PATCH 3/6] Update pom.xml --- pom.xml | 27 ++------------------------- 1 file changed, 2 insertions(+), 25 deletions(-) diff --git a/pom.xml b/pom.xml index 69717e7ec..9ed698bb4 100644 --- a/pom.xml +++ b/pom.xml @@ -24,31 +24,8 @@ 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 - http://repo.spring.io/snapshot - - - spring-milestones - http://repo.spring.io/milestone - - - org.springframework.boot @@ -106,4 +83,4 @@ - \ No newline at end of file + From 393d3f1004798a4bb9b654ff19218a39bfba2653 Mon Sep 17 00:00:00 2001 From: HuoShengLiangIT Date: Thu, 20 Aug 2020 00:42:52 +0800 Subject: [PATCH 4/6] Update pom.xml --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 9ed698bb4..987e783ef 100644 --- a/pom.xml +++ b/pom.xml @@ -24,7 +24,7 @@ org.springframework.boot spring-boot-starter-parent - 2.1.13。RELEASE + 2.1.13.RELEASE From aaf2586b5cb03cdcdac29b8aba60303efddc637a Mon Sep 17 00:00:00 2001 From: HuoShengLiangIT Date: Thu, 20 Aug 2020 19:28:39 +0800 Subject: [PATCH 5/6] Update Jenkinsfile-online --- Jenkinsfile-online | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile-online b/Jenkinsfile-online index a793f564a..9dd7f5caf 100644 --- a/Jenkinsfile-online +++ b/Jenkinsfile-online @@ -30,7 +30,7 @@ pipeline { stage ('unit test') { steps { container ('maven') { - sh 'mvn clean -gs `pwd`/configuration/settings.xml test' + sh 'mvn clean -o -gs `pwd`/configuration/settings.xml test' } } } @@ -40,7 +40,7 @@ pipeline { container ('maven') { withCredentials([string(credentialsId: "$SONAR_CREDENTIAL_ID", variable: 'SONAR_TOKEN')]) { withSonarQubeEnv('sonar') { - sh "mvn sonar:sonar -gs `pwd`/configuration/settings.xml -Dsonar.branch=$BRANCH_NAME -Dsonar.login=$SONAR_TOKEN" + sh "mvn -o sonar:sonar -o -gs `pwd`/configuration/settings.xml -Dsonar.branch=$BRANCH_NAME -Dsonar.login=$SONAR_TOKEN" } } timeout(time: 1, unit: 'HOURS') { From 9e6bb7f1b7241f3791250b589ac1a7b330916acc Mon Sep 17 00:00:00 2001 From: HuoShengLiangIT Date: Thu, 20 Aug 2020 20:52:44 +0800 Subject: [PATCH 6/6] Update Jenkinsfile-online --- Jenkinsfile-online | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile-online b/Jenkinsfile-online index 9dd7f5caf..a793f564a 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' } } } @@ -40,7 +40,7 @@ pipeline { container ('maven') { withCredentials([string(credentialsId: "$SONAR_CREDENTIAL_ID", variable: 'SONAR_TOKEN')]) { withSonarQubeEnv('sonar') { - sh "mvn -o sonar:sonar -o -gs `pwd`/configuration/settings.xml -Dsonar.branch=$BRANCH_NAME -Dsonar.login=$SONAR_TOKEN" + sh "mvn sonar:sonar -gs `pwd`/configuration/settings.xml -Dsonar.branch=$BRANCH_NAME -Dsonar.login=$SONAR_TOKEN" } } timeout(time: 1, unit: 'HOURS') {