From b399c997f33cd00e6e8a5361a994b6960b83113a Mon Sep 17 00:00:00 2001
From: Lzy666Coder <469352817@qq.com>
Date: Thu, 3 Jul 2025 14:35:47 +0800
Subject: [PATCH 1/3] Update Jenkinsfile-online
---
Jenkinsfile-online | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/Jenkinsfile-online b/Jenkinsfile-online
index dec0cebf..e795d46b 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 = 'llccyy'
+ GITHUB_ACCOUNT = 'Lzy666Coder'
APP_NAME = 'devops-java-sample'
- SONAR_CREDENTIAL_ID = 'sonar-token'
+ SONAR_CREDENTIAL_ID = 'sonar-qube'
}
stages {
@@ -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 ecf20784ac72657f201a68f4d9a6d4e8de5ac7e8 Mon Sep 17 00:00:00 2001
From: Lzy666Coder <469352817@qq.com>
Date: Thu, 3 Jul 2025 16:56:51 +0800
Subject: [PATCH 2/3] Update pom.xml
---
pom.xml | 26 +++-----------------------
1 file changed, 3 insertions(+), 23 deletions(-)
diff --git a/pom.xml b/pom.xml
index 69717e7e..3d512361 100644
--- a/pom.xml
+++ b/pom.xml
@@ -24,30 +24,10 @@
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
-
-
+
@@ -106,4 +86,4 @@
-
\ No newline at end of file
+
From 1fc2aa9ee33ef6cb2f723143ef08d8a14342bd5e Mon Sep 17 00:00:00 2001
From: Lzy666Coder <469352817@qq.com>
Date: Thu, 3 Jul 2025 17:18:19 +0800
Subject: [PATCH 3/3] Update Dockerfile-online
---
Dockerfile-online | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Dockerfile-online b/Dockerfile-online
index bffd2783..a6c44d2e 100644
--- a/Dockerfile-online
+++ b/Dockerfile-online
@@ -1,7 +1,7 @@
-FROM java:openjdk-8-jre-alpine
+FROM openjdk:8
WORKDIR /home
COPY target/*.jar /home
-ENTRYPOINT java -jar *.jar
\ No newline at end of file
+ENTRYPOINT java -jar *.jar