From 41d7d1dc32245a2d45117feaf1765dc3ad644452 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Prusa=C5=82owicz?= Date: Tue, 21 Jan 2025 15:32:43 +0100 Subject: [PATCH 01/68] release --- pom.xml | 18 ++++++++++++------ release.properties | 23 +++++++++++++++++++++++ 2 files changed, 35 insertions(+), 6 deletions(-) create mode 100644 release.properties diff --git a/pom.xml b/pom.xml index 9b9b815df..2be7f5bb9 100644 --- a/pom.xml +++ b/pom.xml @@ -6,15 +6,21 @@ org.springframework.boot spring-boot-starter-parent 3.4.0 - + org.springframework.samples spring-petclinic - 3.4.0-SNAPSHOT + 4.0.0-SNAPSHOT petclinic + + scm:git:git://github.com/TomP101/spring-petclinic.git + scm:git:ssh://git@github.com/TomP101/spring-petclinic.git + https://github.com/TomP101/spring-petclinic + + @@ -23,7 +29,7 @@ UTF-8 - 2024-11-28T14:37:52Z + 2025-01-21T13:34:14Z 1.0.1 @@ -414,7 +420,7 @@ - + @@ -427,7 +433,7 @@ - + @@ -440,7 +446,7 @@ - + diff --git a/release.properties b/release.properties new file mode 100644 index 000000000..167bc1e48 --- /dev/null +++ b/release.properties @@ -0,0 +1,23 @@ +#release configuration +#Tue Jan 21 15:31:05 CET 2025 +completedPhase=check-poms +exec.pomFileName=pom.xml +exec.snapshotReleasePluginAllowed=false +pinExternals=false +preparationGoals=clean verify +project.scm.org.springframework.samples\:spring-petclinic.connection=scm\:git\:git\://github.com/TomP101/spring-petclinic.git +project.scm.org.springframework.samples\:spring-petclinic.developerConnection=scm\:git\:ssh\://git@github.com/TomP101/spring-petclinic.git +project.scm.org.springframework.samples\:spring-petclinic.tag=HEAD +project.scm.org.springframework.samples\:spring-petclinic.url=https\://github.com/TomP101/spring-petclinic +projectVersionPolicyConfig=${projectVersionPolicyConfig}\n +projectVersionPolicyId=default +pushChanges=true +releaseStrategyId=default +remoteTagging=true +scm.branchCommitComment=@{prefix} prepare branch @{releaseLabel} +scm.commentPrefix=release +scm.developmentCommitComment=@{prefix} prepare for next development iteration +scm.releaseCommitComment=@{prefix} prepare release @{releaseLabel} +scm.rollbackCommitComment=@{prefix} rollback the release of @{releaseLabel} +scm.tagNameFormat=@{project.artifactId}-@{project.version} +scm.url=scm\:git\:ssh\://git@github.com/TomP101/spring-petclinic.git From 5f66156c7a9df2445f9b8bdea9e6f70c80145c23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Prusa=C5=82owicz?= Date: Tue, 21 Jan 2025 15:33:12 +0100 Subject: [PATCH 02/68] release prepare release spring-petclinic-1.0.0 --- pom.xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 2be7f5bb9..41d66e064 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ org.springframework.samples spring-petclinic - 4.0.0-SNAPSHOT + 1.0.0 petclinic @@ -19,6 +19,7 @@ scm:git:git://github.com/TomP101/spring-petclinic.git scm:git:ssh://git@github.com/TomP101/spring-petclinic.git https://github.com/TomP101/spring-petclinic + spring-petclinic-1.0.0 @@ -29,7 +30,7 @@ UTF-8 - 2025-01-21T13:34:14Z + 2025-01-21T14:32:49Z 1.0.1 From cc4a7d68aa5d1d3536dfe7424217c9d3ba25edb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Prusa=C5=82owicz?= Date: Tue, 21 Jan 2025 15:33:16 +0100 Subject: [PATCH 03/68] release prepare for next development iteration --- pom.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 41d66e064..ce5dd066f 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ org.springframework.samples spring-petclinic - 1.0.0 + 1.1.0-SNAPSHOT petclinic @@ -19,7 +19,7 @@ scm:git:git://github.com/TomP101/spring-petclinic.git scm:git:ssh://git@github.com/TomP101/spring-petclinic.git https://github.com/TomP101/spring-petclinic - spring-petclinic-1.0.0 + HEAD @@ -30,7 +30,7 @@ UTF-8 - 2025-01-21T14:32:49Z + 2025-01-21T14:33:16Z 1.0.1 From 486c194722e90c8934c34d33cc65cfb003963d9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Prusa=C5=82owicz?= Date: Tue, 21 Jan 2025 15:35:22 +0100 Subject: [PATCH 04/68] release rollback the release of spring-petclinic-1.0.0 --- pom.xml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index ce5dd066f..2be7f5bb9 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ org.springframework.samples spring-petclinic - 1.1.0-SNAPSHOT + 4.0.0-SNAPSHOT petclinic @@ -19,7 +19,6 @@ scm:git:git://github.com/TomP101/spring-petclinic.git scm:git:ssh://git@github.com/TomP101/spring-petclinic.git https://github.com/TomP101/spring-petclinic - HEAD @@ -30,7 +29,7 @@ UTF-8 - 2025-01-21T14:33:16Z + 2025-01-21T13:34:14Z 1.0.1 From ca950a53ca08768bffc539659cc57f181b8a1e68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Prusa=C5=82owicz?= Date: Tue, 21 Jan 2025 15:50:29 +0100 Subject: [PATCH 05/68] release prepare release spring-petclinic-1.0.0 --- pom.xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 2be7f5bb9..fa5c006f6 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ org.springframework.samples spring-petclinic - 4.0.0-SNAPSHOT + 1.0.0 petclinic @@ -19,6 +19,7 @@ scm:git:git://github.com/TomP101/spring-petclinic.git scm:git:ssh://git@github.com/TomP101/spring-petclinic.git https://github.com/TomP101/spring-petclinic + spring-petclinic-1.0.0 @@ -29,7 +30,7 @@ UTF-8 - 2025-01-21T13:34:14Z + 2025-01-21T14:50:07Z 1.0.1 From 36978d02cd19f76452db1340c68eb9cab924169c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Prusa=C5=82owicz?= Date: Tue, 21 Jan 2025 15:50:35 +0100 Subject: [PATCH 06/68] release prepare for next development iteration --- pom.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index fa5c006f6..a0be76ec9 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ org.springframework.samples spring-petclinic - 1.0.0 + 1.1.0-SNAPSHOT petclinic @@ -19,7 +19,7 @@ scm:git:git://github.com/TomP101/spring-petclinic.git scm:git:ssh://git@github.com/TomP101/spring-petclinic.git https://github.com/TomP101/spring-petclinic - spring-petclinic-1.0.0 + HEAD @@ -30,7 +30,7 @@ UTF-8 - 2025-01-21T14:50:07Z + 2025-01-21T14:50:35Z 1.0.1 From 62ce4306ea08fa56da99aa68c16c81cc0dcf607e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Prusa=C5=82owicz?= Date: Tue, 21 Jan 2025 16:41:08 +0100 Subject: [PATCH 07/68] added distributionmanagament --- pom.xml | 11 + pom.xml.releaseBackup | 461 ++++++++++++++++++++++++++++++++++++++++++ release.properties | 23 --- 3 files changed, 472 insertions(+), 23 deletions(-) create mode 100644 pom.xml.releaseBackup delete mode 100644 release.properties diff --git a/pom.xml b/pom.xml index a0be76ec9..e14c1010a 100644 --- a/pom.xml +++ b/pom.xml @@ -22,6 +22,17 @@ HEAD + + + release-repo + file://${project.build.directory}/deploy/releases + + + snapshot-repo + file://${project.build.directory}/deploy/snapshots + + + diff --git a/pom.xml.releaseBackup b/pom.xml.releaseBackup new file mode 100644 index 000000000..2be7f5bb9 --- /dev/null +++ b/pom.xml.releaseBackup @@ -0,0 +1,461 @@ + + + 4.0.0 + + + org.springframework.boot + spring-boot-starter-parent + 3.4.0 + + + + org.springframework.samples + spring-petclinic + 4.0.0-SNAPSHOT + + petclinic + + + scm:git:git://github.com/TomP101/spring-petclinic.git + scm:git:ssh://git@github.com/TomP101/spring-petclinic.git + https://github.com/TomP101/spring-petclinic + + + + + + 17 + UTF-8 + UTF-8 + + 2025-01-21T13:34:14Z + + + 1.0.1 + 5.3.3 + 4.7.0 + + 10.20.1 + 0.8.12 + 0.2.29 + 1.0.0 + 3.6.0 + 0.0.11 + 0.0.43 + + + + + + + org.springframework.boot + spring-boot-starter-actuator + + + org.springframework.boot + spring-boot-starter-cache + + + org.springframework.boot + spring-boot-starter-data-jpa + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.boot + spring-boot-starter-validation + + + org.springframework.boot + spring-boot-starter-thymeleaf + + + org.springframework.boot + spring-boot-starter-test + test + + + + io.projectreactor + reactor-core + + + + + com.h2database + h2 + runtime + + + com.mysql + mysql-connector-j + runtime + + + org.postgresql + postgresql + runtime + + + + + javax.cache + cache-api + + + com.github.ben-manes.caffeine + caffeine + + + + + org.webjars + webjars-locator-lite + ${webjars-locator.version} + + + org.webjars.npm + bootstrap + ${webjars-bootstrap.version} + + + org.webjars.npm + font-awesome + ${webjars-font-awesome.version} + + + + org.springframework.boot + spring-boot-devtools + test + + + org.springframework.boot + spring-boot-testcontainers + test + + + org.springframework.boot + spring-boot-docker-compose + test + + + org.testcontainers + junit-jupiter + test + + + org.testcontainers + mysql + test + + + + jakarta.xml.bind + jakarta.xml.bind-api + + + + + + + + org.apache.maven.plugins + maven-enforcer-plugin + + + enforce-java + + enforce + + + + + This build requires at least Java ${java.version}, + update your JVM, and + run the build again + ${java.version} + + + + + + + + io.spring.javaformat + spring-javaformat-maven-plugin + ${spring-format.version} + + + + validate + + validate + + + + + org.apache.maven.plugins + maven-checkstyle-plugin + ${maven-checkstyle.version} + + + com.puppycrawl.tools + checkstyle + ${checkstyle.version} + + + io.spring.nohttp + nohttp-checkstyle + ${nohttp-checkstyle.version} + + + + + nohttp-checkstyle-validation + + check + + validate + + src/checkstyle/nohttp-checkstyle.xml + ${basedir} + **/* + **/.git/**/*,**/.idea/**/*,**/target/**/,**/.flattened-pom.xml,**/*.class + config_loc=${basedir}/src/checkstyle/ + + + + + + org.graalvm.buildtools + native-maven-plugin + + + org.springframework.boot + spring-boot-maven-plugin + + + + + build-info + + + + ${project.build.sourceEncoding} + ${project.reporting.outputEncoding} + ${java.version} + ${java.version} + + + + + + + org.jacoco + jacoco-maven-plugin + ${jacoco.version} + + + + prepare-agent + + + + report + + report + + prepare-package + + + + + + + io.github.git-commit-id + git-commit-id-maven-plugin + + false + false + + + + + + org.cyclonedx + cyclonedx-maven-plugin + + + + + + + Apache License, Version 2.0 + https://www.apache.org/licenses/LICENSE-2.0 + + + + + + + true + + spring-snapshots + Spring Snapshots + https://repo.spring.io/snapshot + + + + false + + spring-milestones + Spring Milestones + https://repo.spring.io/milestone + + + + + + true + + spring-snapshots + Spring Snapshots + https://repo.spring.io/snapshot + + + + false + + spring-milestones + Spring Milestones + https://repo.spring.io/milestone + + + + + + css + + + + org.apache.maven.plugins + maven-dependency-plugin + + + unpack + + unpack + + + generate-resources + + + + org.webjars.npm + bootstrap + ${webjars-bootstrap.version} + + + ${project.build.directory}/webjars + + + + + + + com.gitlab.haynes + libsass-maven-plugin + ${libsass.version} + + ${basedir}/src/main/scss/ + ${basedir}/src/main/resources/static/resources/css/ + ${project.build.directory}/webjars/META-INF/resources/webjars/bootstrap/${webjars-bootstrap.version}/scss/ + + + + + + compile + + generate-resources + + + + + + + + m2e + + + m2e.version + + + + + + + + org.eclipse.m2e + lifecycle-mapping + ${lifecycle-mapping} + + + + + + org.apache.maven.plugins + maven-checkstyle-plugin + [1,) + + check + + + + + + + + + org.springframework.boot + spring-boot-maven-plugin + [1,) + + build-info + + + + + + + + + io.spring.javaformat + spring-javaformat-maven-plugin + [0,) + + validate + + + + + + + + + + + + + + + + diff --git a/release.properties b/release.properties deleted file mode 100644 index 167bc1e48..000000000 --- a/release.properties +++ /dev/null @@ -1,23 +0,0 @@ -#release configuration -#Tue Jan 21 15:31:05 CET 2025 -completedPhase=check-poms -exec.pomFileName=pom.xml -exec.snapshotReleasePluginAllowed=false -pinExternals=false -preparationGoals=clean verify -project.scm.org.springframework.samples\:spring-petclinic.connection=scm\:git\:git\://github.com/TomP101/spring-petclinic.git -project.scm.org.springframework.samples\:spring-petclinic.developerConnection=scm\:git\:ssh\://git@github.com/TomP101/spring-petclinic.git -project.scm.org.springframework.samples\:spring-petclinic.tag=HEAD -project.scm.org.springframework.samples\:spring-petclinic.url=https\://github.com/TomP101/spring-petclinic -projectVersionPolicyConfig=${projectVersionPolicyConfig}\n -projectVersionPolicyId=default -pushChanges=true -releaseStrategyId=default -remoteTagging=true -scm.branchCommitComment=@{prefix} prepare branch @{releaseLabel} -scm.commentPrefix=release -scm.developmentCommitComment=@{prefix} prepare for next development iteration -scm.releaseCommitComment=@{prefix} prepare release @{releaseLabel} -scm.rollbackCommitComment=@{prefix} rollback the release of @{releaseLabel} -scm.tagNameFormat=@{project.artifactId}-@{project.version} -scm.url=scm\:git\:ssh\://git@github.com/TomP101/spring-petclinic.git From 96802d66cf6fdca5ccd7d1fd63bb69b55f7686f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Prusa=C5=82owicz?= Date: Tue, 21 Jan 2025 16:41:41 +0100 Subject: [PATCH 08/68] release prepare release release-1.0.0 --- pom.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index e14c1010a..8d1ac5830 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ org.springframework.samples spring-petclinic - 1.1.0-SNAPSHOT + 1.0.0 petclinic @@ -19,7 +19,7 @@ scm:git:git://github.com/TomP101/spring-petclinic.git scm:git:ssh://git@github.com/TomP101/spring-petclinic.git https://github.com/TomP101/spring-petclinic - HEAD + release-1.0.0 @@ -41,7 +41,7 @@ UTF-8 - 2025-01-21T14:50:35Z + 2025-01-21T15:41:19Z 1.0.1 From a36b67da68c3114c6b0387d11cfd2d91274a78bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Prusa=C5=82owicz?= Date: Tue, 21 Jan 2025 16:41:45 +0100 Subject: [PATCH 09/68] release prepare for next development iteration --- pom.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 8d1ac5830..50a0b3ed5 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ org.springframework.samples spring-petclinic - 1.0.0 + 1.1.0-SNAPSHOT petclinic @@ -19,7 +19,7 @@ scm:git:git://github.com/TomP101/spring-petclinic.git scm:git:ssh://git@github.com/TomP101/spring-petclinic.git https://github.com/TomP101/spring-petclinic - release-1.0.0 + HEAD @@ -41,7 +41,7 @@ UTF-8 - 2025-01-21T15:41:19Z + 2025-01-21T15:41:45Z 1.0.1 From 841083a729985ee0059408eb256860d53a1d7171 Mon Sep 17 00:00:00 2001 From: TomPGrid Date: Wed, 26 Feb 2025 10:45:34 +0100 Subject: [PATCH 10/68] add dockerfile --- Dockerfile | 32 +++ pom.xml | 10 +- pom.xml.releaseBackup | 461 ------------------------------------------ 3 files changed, 38 insertions(+), 465 deletions(-) create mode 100644 Dockerfile delete mode 100644 pom.xml.releaseBackup diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..21d1b5e84 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,32 @@ +FROM maven AS build +WORKDIR /app +COPY pom.xml . +COPY src ./src +RUN mvn clean package -DskipTests + +RUN jar xf /app/target/spring-petclinic-3.4.0-SNAPSHOT.jar +RUN jdeps \ + --ignore-missing-deps \ + --print-module-deps \ + --multi-release 17 \ + --recursive \ + --class-path 'BOOT-INF/lib/*' \ + /app/target/spring-petclinic-3.4.0-SNAPSHOT.jar > modules.txt + +RUN $JAVA_HOME/bin/jlink \ + --add-modules $(cat modules.txt) \ + --strip-debug \ + --no-man-pages \ + --no-header-files \ + --compress=2 \ + --output /javaruntime + +FROM debian:buster-slim +ENV JAVA_HOME=/opt/java/openjdk +ENV PATH="${JAVA_HOME}/bin:${PATH}" +COPY --from=build /javaruntime $JAVA_HOME + +WORKDIR /app +COPY --from=build /app/target/spring-petclinic-3.4.0-SNAPSHOT.jar . +CMD ["java", "-Dspring.profiles.active=postgres", "-jar", "spring-petclinic-3.4.0-SNAPSHOT.jar"] + diff --git a/pom.xml b/pom.xml index 50a0b3ed5..f458705bf 100644 --- a/pom.xml +++ b/pom.xml @@ -24,12 +24,14 @@ - release-repo - file://${project.build.directory}/deploy/releases + nexus + releases + http://localhost:8081/repository/maven-releases/ - snapshot-repo - file://${project.build.directory}/deploy/snapshots + nexus + snapshots + http://localhost:8081/repository/maven-snapshots/ diff --git a/pom.xml.releaseBackup b/pom.xml.releaseBackup deleted file mode 100644 index 2be7f5bb9..000000000 --- a/pom.xml.releaseBackup +++ /dev/null @@ -1,461 +0,0 @@ - - - 4.0.0 - - - org.springframework.boot - spring-boot-starter-parent - 3.4.0 - - - - org.springframework.samples - spring-petclinic - 4.0.0-SNAPSHOT - - petclinic - - - scm:git:git://github.com/TomP101/spring-petclinic.git - scm:git:ssh://git@github.com/TomP101/spring-petclinic.git - https://github.com/TomP101/spring-petclinic - - - - - - 17 - UTF-8 - UTF-8 - - 2025-01-21T13:34:14Z - - - 1.0.1 - 5.3.3 - 4.7.0 - - 10.20.1 - 0.8.12 - 0.2.29 - 1.0.0 - 3.6.0 - 0.0.11 - 0.0.43 - - - - - - - org.springframework.boot - spring-boot-starter-actuator - - - org.springframework.boot - spring-boot-starter-cache - - - org.springframework.boot - spring-boot-starter-data-jpa - - - org.springframework.boot - spring-boot-starter-web - - - org.springframework.boot - spring-boot-starter-validation - - - org.springframework.boot - spring-boot-starter-thymeleaf - - - org.springframework.boot - spring-boot-starter-test - test - - - - io.projectreactor - reactor-core - - - - - com.h2database - h2 - runtime - - - com.mysql - mysql-connector-j - runtime - - - org.postgresql - postgresql - runtime - - - - - javax.cache - cache-api - - - com.github.ben-manes.caffeine - caffeine - - - - - org.webjars - webjars-locator-lite - ${webjars-locator.version} - - - org.webjars.npm - bootstrap - ${webjars-bootstrap.version} - - - org.webjars.npm - font-awesome - ${webjars-font-awesome.version} - - - - org.springframework.boot - spring-boot-devtools - test - - - org.springframework.boot - spring-boot-testcontainers - test - - - org.springframework.boot - spring-boot-docker-compose - test - - - org.testcontainers - junit-jupiter - test - - - org.testcontainers - mysql - test - - - - jakarta.xml.bind - jakarta.xml.bind-api - - - - - - - - org.apache.maven.plugins - maven-enforcer-plugin - - - enforce-java - - enforce - - - - - This build requires at least Java ${java.version}, - update your JVM, and - run the build again - ${java.version} - - - - - - - - io.spring.javaformat - spring-javaformat-maven-plugin - ${spring-format.version} - - - - validate - - validate - - - - - org.apache.maven.plugins - maven-checkstyle-plugin - ${maven-checkstyle.version} - - - com.puppycrawl.tools - checkstyle - ${checkstyle.version} - - - io.spring.nohttp - nohttp-checkstyle - ${nohttp-checkstyle.version} - - - - - nohttp-checkstyle-validation - - check - - validate - - src/checkstyle/nohttp-checkstyle.xml - ${basedir} - **/* - **/.git/**/*,**/.idea/**/*,**/target/**/,**/.flattened-pom.xml,**/*.class - config_loc=${basedir}/src/checkstyle/ - - - - - - org.graalvm.buildtools - native-maven-plugin - - - org.springframework.boot - spring-boot-maven-plugin - - - - - build-info - - - - ${project.build.sourceEncoding} - ${project.reporting.outputEncoding} - ${java.version} - ${java.version} - - - - - - - org.jacoco - jacoco-maven-plugin - ${jacoco.version} - - - - prepare-agent - - - - report - - report - - prepare-package - - - - - - - io.github.git-commit-id - git-commit-id-maven-plugin - - false - false - - - - - - org.cyclonedx - cyclonedx-maven-plugin - - - - - - - Apache License, Version 2.0 - https://www.apache.org/licenses/LICENSE-2.0 - - - - - - - true - - spring-snapshots - Spring Snapshots - https://repo.spring.io/snapshot - - - - false - - spring-milestones - Spring Milestones - https://repo.spring.io/milestone - - - - - - true - - spring-snapshots - Spring Snapshots - https://repo.spring.io/snapshot - - - - false - - spring-milestones - Spring Milestones - https://repo.spring.io/milestone - - - - - - css - - - - org.apache.maven.plugins - maven-dependency-plugin - - - unpack - - unpack - - - generate-resources - - - - org.webjars.npm - bootstrap - ${webjars-bootstrap.version} - - - ${project.build.directory}/webjars - - - - - - - com.gitlab.haynes - libsass-maven-plugin - ${libsass.version} - - ${basedir}/src/main/scss/ - ${basedir}/src/main/resources/static/resources/css/ - ${project.build.directory}/webjars/META-INF/resources/webjars/bootstrap/${webjars-bootstrap.version}/scss/ - - - - - - compile - - generate-resources - - - - - - - - m2e - - - m2e.version - - - - - - - - org.eclipse.m2e - lifecycle-mapping - ${lifecycle-mapping} - - - - - - org.apache.maven.plugins - maven-checkstyle-plugin - [1,) - - check - - - - - - - - - org.springframework.boot - spring-boot-maven-plugin - [1,) - - build-info - - - - - - - - - io.spring.javaformat - spring-javaformat-maven-plugin - [0,) - - validate - - - - - - - - - - - - - - - - From 9324e6ef3dcac4afca0845eb005f7e4d7f6b37df Mon Sep 17 00:00:00 2001 From: TomPGrid Date: Wed, 26 Feb 2025 11:36:50 +0100 Subject: [PATCH 11/68] add simplet test jenkinsfile --- Jenkinsfile | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 000000000..5c63ccd72 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,10 @@ +pipeline { + agent any + stages { + stage('Build') { + steps { + echo 'Bulding' + } + } + } +} From 6bf48d17d6b09f0409b77c14dd07c113044f4330 Mon Sep 17 00:00:00 2001 From: TomPGrid Date: Wed, 26 Feb 2025 11:45:58 +0100 Subject: [PATCH 12/68] change jenkinsfile --- Jenkinsfile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 5c63ccd72..284fbdb58 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,9 +1,15 @@ pipeline { agent any + + tools { + maven 'M3' + } stages { stage('Build') { steps { echo 'Bulding' + checkout scm + sh 'mvn checkstyle:checkstyle' } } } From eceaf613945b3632e81a90308d161d745862a671 Mon Sep 17 00:00:00 2001 From: TomPGrid Date: Thu, 27 Feb 2025 09:36:21 +0100 Subject: [PATCH 13/68] change jnkinsfile --- Jenkinsfile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 284fbdb58..02dff4ceb 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,9 +1,8 @@ pipeline { - agent any - - tools { - maven 'M3' + agent { + docker { image 'maven:3.8.5-openjdk-17' } } + stages { stage('Build') { steps { From 82e86404ce381126b220d6f66c4fb505f80fa985 Mon Sep 17 00:00:00 2001 From: TomPGrid Date: Thu, 27 Feb 2025 13:58:28 +0100 Subject: [PATCH 14/68] add build stage to Jenkinsfile --- Jenkinsfile | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 02dff4ceb..ff9213561 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -4,12 +4,28 @@ pipeline { } stages { - stage('Build') { + stage('Checkstyle') { steps { - echo 'Bulding' checkout scm sh 'mvn checkstyle:checkstyle' } + post { + always { + archiveArtifacts artifacts: 'target/checkstyle-result.xml', allowEmptyArchive: true + } + } } + + stage('Build') { + steps { + sh 'mvn clean package -DskipTests' + } + post { + always { + archiveArtifacts artifacts: 'target/*.jar', allowEmptyArchive: true + } + } + } + } } From 43f4a3f015a9c0af3bbd7e422ad6c213b19cd863 Mon Sep 17 00:00:00 2001 From: TomPGrid Date: Thu, 27 Feb 2025 14:06:53 +0100 Subject: [PATCH 15/68] changed pom.xml to adjust the checkstyle plugin --- pom.xml | 48 ++++++++++++++++++++---------------------------- 1 file changed, 20 insertions(+), 28 deletions(-) diff --git a/pom.xml b/pom.xml index f458705bf..33bf04c6f 100644 --- a/pom.xml +++ b/pom.xml @@ -6,35 +6,15 @@ org.springframework.boot spring-boot-starter-parent 3.4.0 - + org.springframework.samples spring-petclinic - 1.1.0-SNAPSHOT + 3.4.0-SNAPSHOT petclinic - - scm:git:git://github.com/TomP101/spring-petclinic.git - scm:git:ssh://git@github.com/TomP101/spring-petclinic.git - https://github.com/TomP101/spring-petclinic - HEAD - - - - - nexus - releases - http://localhost:8081/repository/maven-releases/ - - - nexus - snapshots - http://localhost:8081/repository/maven-snapshots/ - - - @@ -43,7 +23,7 @@ UTF-8 - 2025-01-21T15:41:45Z + 2024-11-28T14:37:52Z 1.0.1 @@ -189,8 +169,8 @@ This build requires at least Java ${java.version}, - update your JVM, and - run the build again + update your JVM, and + run the build again ${java.version} @@ -242,6 +222,18 @@ config_loc=${basedir}/src/checkstyle/ + + generate-checkstyle-report + verify + + checkstyle + + + src/checkstyle/nohttp-checkstyle.xml + target/site/checkstyle.html + plain + + @@ -434,7 +426,7 @@ - + @@ -447,7 +439,7 @@ - + @@ -460,7 +452,7 @@ - + From 1ef7f8a7d99a2ff6791212d294a098526dd45248 Mon Sep 17 00:00:00 2001 From: TomPGrid Date: Fri, 28 Feb 2025 09:11:22 +0100 Subject: [PATCH 16/68] commented unnecesary part --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index ff9213561..85f5a2fed 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -15,7 +15,7 @@ pipeline { } } } - +/* stage('Build') { steps { sh 'mvn clean package -DskipTests' @@ -26,6 +26,6 @@ pipeline { } } } - + */ } } From ef30b7e563a21c95d797b8036f043001dac5d9db Mon Sep 17 00:00:00 2001 From: TomPGrid Date: Fri, 28 Feb 2025 09:19:45 +0100 Subject: [PATCH 17/68] commented unnecesary part --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 85f5a2fed..734e8dd7d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -15,11 +15,11 @@ pipeline { } } } -/* stage('Build') { steps { sh 'mvn clean package -DskipTests' } +/* post { always { archiveArtifacts artifacts: 'target/*.jar', allowEmptyArchive: true From 2c8fffa147985e482be0309f995245739c7a1a43 Mon Sep 17 00:00:00 2001 From: TomPGrid Date: Fri, 28 Feb 2025 09:20:47 +0100 Subject: [PATCH 18/68] commented unnecesary part --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 734e8dd7d..04ea73cd2 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -25,7 +25,7 @@ pipeline { archiveArtifacts artifacts: 'target/*.jar', allowEmptyArchive: true } } +*/ } - */ } } From 40992f8f547bd4a5f3d6c5b84292a0a4be71febf Mon Sep 17 00:00:00 2001 From: TomPGrid Date: Fri, 28 Feb 2025 10:40:53 +0100 Subject: [PATCH 19/68] skip the checktyle in build --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 04ea73cd2..4697af5bf 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -17,7 +17,7 @@ pipeline { } stage('Build') { steps { - sh 'mvn clean package -DskipTests' + sh 'mvn clean package -DskipTests -Dcheckstyle.skip=true' } /* post { From 487f87820e30c3727d42934a238e5e7d34c740b5 Mon Sep 17 00:00:00 2001 From: TomPGrid Date: Fri, 28 Feb 2025 10:43:01 +0100 Subject: [PATCH 20/68] skip the checktyle in build --- Jenkinsfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 4697af5bf..f5075d93c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -19,13 +19,11 @@ pipeline { steps { sh 'mvn clean package -DskipTests -Dcheckstyle.skip=true' } -/* post { always { archiveArtifacts artifacts: 'target/*.jar', allowEmptyArchive: true } } -*/ } } } From ea70b9bcd98b286aa60ff73d6319ec7eb634f710 Mon Sep 17 00:00:00 2001 From: TomPGrid Date: Fri, 28 Feb 2025 10:46:44 +0100 Subject: [PATCH 21/68] add test stage --- Jenkinsfile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index f5075d93c..bbe8760d3 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -15,6 +15,11 @@ pipeline { } } } + stage('Test') { + steps { + sh 'mvn test' + } + } stage('Build') { steps { sh 'mvn clean package -DskipTests -Dcheckstyle.skip=true' From a0807d5f3af81a5f0671fac98d3870bbfa7fb72d Mon Sep 17 00:00:00 2001 From: TomPGrid Date: Fri, 28 Feb 2025 10:49:55 +0100 Subject: [PATCH 22/68] skip checkstyle in test --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index bbe8760d3..b0fc6efa5 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -17,7 +17,7 @@ pipeline { } stage('Test') { steps { - sh 'mvn test' + sh 'mvn test -Dcheckstyle.skip=true' } } stage('Build') { From 2ba17ecb45f114641dd95f9504fd95692bb61e8c Mon Sep 17 00:00:00 2001 From: TomPGrid Date: Fri, 28 Feb 2025 11:19:14 +0100 Subject: [PATCH 23/68] add build image --- Jenkinsfile | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index b0fc6efa5..5d8082803 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -30,5 +30,16 @@ pipeline { } } } + stage('Build Image') { + agent { + image 'docker:20.10.16' + args '--privileged -v /var/ryn/docker.sock:/var/run/docker.sock' + } + steps { + sh 'docker login -u "$REGISTRY_USER" -p "$REGISTRY_PASS" mr:8084' + sh 'docker build -t mr:8084/spring-petclinic:$GITCOMMIT .' + sh 'docker push mr:8084/spring-petclinic:$GITCOMMIT' + } + } } } From 2ba789c2a1da97b4dc93e1c961e1c11e518dd6fe Mon Sep 17 00:00:00 2001 From: TomPGrid Date: Fri, 28 Feb 2025 11:20:54 +0100 Subject: [PATCH 24/68] add build image --- Jenkinsfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 5d8082803..02bc0e392 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -33,7 +33,6 @@ pipeline { stage('Build Image') { agent { image 'docker:20.10.16' - args '--privileged -v /var/ryn/docker.sock:/var/run/docker.sock' } steps { sh 'docker login -u "$REGISTRY_USER" -p "$REGISTRY_PASS" mr:8084' From 059954ae34e2dd5614aff8f36767f92355912a59 Mon Sep 17 00:00:00 2001 From: TomPGrid Date: Fri, 28 Feb 2025 11:24:59 +0100 Subject: [PATCH 25/68] fix typo --- Jenkinsfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 02bc0e392..622c7d467 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -33,11 +33,12 @@ pipeline { stage('Build Image') { agent { image 'docker:20.10.16' + args '--privileged -v /var/run/docker.sock:/var/run/docker.sock' } steps { sh 'docker login -u "$REGISTRY_USER" -p "$REGISTRY_PASS" mr:8084' - sh 'docker build -t mr:8084/spring-petclinic:$GITCOMMIT .' - sh 'docker push mr:8084/spring-petclinic:$GITCOMMIT' + sh 'docker build -t mr:8084/spring-petclinic:${GIT_COMMIT} .' + sh 'docker push mr:8084/spring-petclinic:${GIT_COMMIT}' } } } From ee7775d2adeec21da3bb576391f223b6dd22ea91 Mon Sep 17 00:00:00 2001 From: TomPGrid Date: Fri, 28 Feb 2025 11:27:24 +0100 Subject: [PATCH 26/68] bug fixing --- Jenkinsfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 622c7d467..059c84c32 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -32,8 +32,10 @@ pipeline { } stage('Build Image') { agent { - image 'docker:20.10.16' - args '--privileged -v /var/run/docker.sock:/var/run/docker.sock' + docker { + image 'docker:20.10.16' + args '--privileged -v /var/run/docker.sock:/var/run/docker.sock' + } } steps { sh 'docker login -u "$REGISTRY_USER" -p "$REGISTRY_PASS" mr:8084' From 5a6b36b85552bfc3e69a731bf57ee7f440d01614 Mon Sep 17 00:00:00 2001 From: TomPGrid Date: Fri, 28 Feb 2025 12:06:16 +0100 Subject: [PATCH 27/68] test changes --- Jenkinsfile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 059c84c32..504c2d44e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -38,9 +38,13 @@ pipeline { } } steps { + checkout scm + + def docker_image=docker.build("mr:8084/spring-petclinic:${env.GIT_COMMIT}") sh 'docker login -u "$REGISTRY_USER" -p "$REGISTRY_PASS" mr:8084' - sh 'docker build -t mr:8084/spring-petclinic:${GIT_COMMIT} .' - sh 'docker push mr:8084/spring-petclinic:${GIT_COMMIT}' + + docker_image.push('${env.GIT_COMMIT}) + sh 'docker push mr:8084/spring-petclinic:${env.GIT_COMMIT}' } } } From f19d6dd57e6134db50d916fee8f16d0374926e05 Mon Sep 17 00:00:00 2001 From: TomPGrid Date: Fri, 28 Feb 2025 12:09:06 +0100 Subject: [PATCH 28/68] change how variables are called --- Jenkinsfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 504c2d44e..6431446da 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -40,11 +40,11 @@ pipeline { steps { checkout scm - def docker_image=docker.build("mr:8084/spring-petclinic:${env.GIT_COMMIT}") + def docker_image=docker.build("mr:8084/spring-petclinic:${GIT_COMMIT}") sh 'docker login -u "$REGISTRY_USER" -p "$REGISTRY_PASS" mr:8084' - docker_image.push('${env.GIT_COMMIT}) - sh 'docker push mr:8084/spring-petclinic:${env.GIT_COMMIT}' + docker_image.push('${GIT_COMMIT}) + sh 'docker push mr:8084/spring-petclinic:${GIT_COMMIT}' } } } From 644f7ff875703d76e2abd7885a27dbf2e189e526 Mon Sep 17 00:00:00 2001 From: TomPGrid Date: Fri, 28 Feb 2025 12:10:22 +0100 Subject: [PATCH 29/68] change how variables are called --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 6431446da..b36878318 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -43,7 +43,7 @@ pipeline { def docker_image=docker.build("mr:8084/spring-petclinic:${GIT_COMMIT}") sh 'docker login -u "$REGISTRY_USER" -p "$REGISTRY_PASS" mr:8084' - docker_image.push('${GIT_COMMIT}) + docker_image.push('${GIT_COMMIT}') sh 'docker push mr:8084/spring-petclinic:${GIT_COMMIT}' } } From e91127bd323408cab8f547b46f91fd454bb2a008 Mon Sep 17 00:00:00 2001 From: TomPGrid Date: Fri, 28 Feb 2025 12:13:45 +0100 Subject: [PATCH 30/68] change how variables are called --- Jenkinsfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index b36878318..6eae1e827 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -40,11 +40,11 @@ pipeline { steps { checkout scm - def docker_image=docker.build("mr:8084/spring-petclinic:${GIT_COMMIT}") + def docker_image=docker.build("mr:8084/spring-petclinic:$GIT_COMMIT") sh 'docker login -u "$REGISTRY_USER" -p "$REGISTRY_PASS" mr:8084' - docker_image.push('${GIT_COMMIT}') - sh 'docker push mr:8084/spring-petclinic:${GIT_COMMIT}' + docker_image.push('$GIT_COMMIT') + sh 'docker push mr:8084/spring-petclinic:$GIT_COMMIT' } } } From d1848d7c041979a5c3147dac3c0a787a0b88624c Mon Sep 17 00:00:00 2001 From: TomPGrid Date: Fri, 28 Feb 2025 12:16:55 +0100 Subject: [PATCH 31/68] changed how push is invoked --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 6eae1e827..c6c1a2576 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -43,7 +43,7 @@ pipeline { def docker_image=docker.build("mr:8084/spring-petclinic:$GIT_COMMIT") sh 'docker login -u "$REGISTRY_USER" -p "$REGISTRY_PASS" mr:8084' - docker_image.push('$GIT_COMMIT') + docker_image.push() sh 'docker push mr:8084/spring-petclinic:$GIT_COMMIT' } } From f61ab0a514ccf99a25d5d9fbb485aab6d30950e9 Mon Sep 17 00:00:00 2001 From: TomPGrid Date: Fri, 28 Feb 2025 13:09:48 +0100 Subject: [PATCH 32/68] changed how push is invoked --- Jenkinsfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index c6c1a2576..3a5879c9b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -42,9 +42,9 @@ pipeline { def docker_image=docker.build("mr:8084/spring-petclinic:$GIT_COMMIT") sh 'docker login -u "$REGISTRY_USER" -p "$REGISTRY_PASS" mr:8084' - - docker_image.push() - sh 'docker push mr:8084/spring-petclinic:$GIT_COMMIT' + docker.withRegistry('mr:8084') { + docker_image.push() + } } } } From 935ce0c7aaf1029b5240370ec127b11aad24b047 Mon Sep 17 00:00:00 2001 From: TomPGrid Date: Fri, 28 Feb 2025 13:18:36 +0100 Subject: [PATCH 33/68] changed how push is invoked --- Jenkinsfile | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 3a5879c9b..1e6a8a5b2 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -39,11 +39,12 @@ pipeline { } steps { checkout scm - - def docker_image=docker.build("mr:8084/spring-petclinic:$GIT_COMMIT") - sh 'docker login -u "$REGISTRY_USER" -p "$REGISTRY_PASS" mr:8084' - docker.withRegistry('mr:8084') { - docker_image.push() + script { + def docker_image=docker.build("mr:8084/spring-petclinic:$GIT_COMMIT") + sh 'docker login -u "$REGISTRY_USER" -p "$REGISTRY_PASS" mr:8084' + docker.withRegistry('mr:8084') { + docker_image.push() + } } } } From ebf39d32e4a60e6b1f37600194fe09d4184bcd63 Mon Sep 17 00:00:00 2001 From: TomPGrid Date: Fri, 28 Feb 2025 13:22:56 +0100 Subject: [PATCH 34/68] remobed checkout scm step in build image --- Jenkinsfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 1e6a8a5b2..f472b8d7b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -38,7 +38,6 @@ pipeline { } } steps { - checkout scm script { def docker_image=docker.build("mr:8084/spring-petclinic:$GIT_COMMIT") sh 'docker login -u "$REGISTRY_USER" -p "$REGISTRY_PASS" mr:8084' From ce27ec7faff7c063c4cafb4e12b7150e13850cc2 Mon Sep 17 00:00:00 2001 From: TomPGrid Date: Fri, 28 Feb 2025 13:30:46 +0100 Subject: [PATCH 35/68] remobed checkout scm step in build image --- Jenkinsfile | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index f472b8d7b..59bbfcfe6 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,10 +1,11 @@ pipeline { - agent { - docker { image 'maven:3.8.5-openjdk-17' } - } + agent none stages { stage('Checkstyle') { + agent { + docker { image 'maven:3.8.5-openjdk-17' } + } steps { checkout scm sh 'mvn checkstyle:checkstyle' @@ -16,11 +17,17 @@ pipeline { } } stage('Test') { + agent { + docker { image 'maven:3.8.5-openjdk-17' } + } steps { sh 'mvn test -Dcheckstyle.skip=true' } } stage('Build') { + agent { + docker { image 'maven:3.8.5-openjdk-17' } + } steps { sh 'mvn clean package -DskipTests -Dcheckstyle.skip=true' } From 41f7d4b720100a6a0f8eb77fa4c94338c05b3952 Mon Sep 17 00:00:00 2001 From: TomPGrid Date: Fri, 28 Feb 2025 13:41:40 +0100 Subject: [PATCH 36/68] add root privliedge to container in build image --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 59bbfcfe6..f3ac6f357 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -41,7 +41,7 @@ pipeline { agent { docker { image 'docker:20.10.16' - args '--privileged -v /var/run/docker.sock:/var/run/docker.sock' + args '--privileged -u root -v /var/run/docker.sock:/var/run/docker.sock' } } steps { From 730a0f69f0f4d7b605c4583dacae82b0ed5628d7 Mon Sep 17 00:00:00 2001 From: TomPGrid Date: Fri, 28 Feb 2025 13:53:06 +0100 Subject: [PATCH 37/68] add http to .push() --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index f3ac6f357..6d2db9fde 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -48,7 +48,7 @@ pipeline { script { def docker_image=docker.build("mr:8084/spring-petclinic:$GIT_COMMIT") sh 'docker login -u "$REGISTRY_USER" -p "$REGISTRY_PASS" mr:8084' - docker.withRegistry('mr:8084') { + docker.withRegistry('http://mr:8084') { docker_image.push() } } From d94209914acfa9df718e88042da3aad49a31d73a Mon Sep 17 00:00:00 2001 From: TomPGrid Date: Fri, 28 Feb 2025 14:04:45 +0100 Subject: [PATCH 38/68] add build image main stage --- Jenkinsfile | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 6d2db9fde..2339b4938 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -54,5 +54,22 @@ pipeline { } } } + stage('Build Image Main') { + agent { + docker { + image 'docker:20.10.16' + args '--privileged -u root -v /var/run/docker.sock:/var/run/docker.sock' + } + } + steps { + script { + def docker_image=docker.build("main:8084/spring-petclinic:$GIT_COMMIT") + sh 'docker login -u "$REGISTRY_USER" -p "$REGISTRY_PASS" main:8084' + docker.withRegistry('http://main:8084') { + docker_image.push() + } + } + } + } } } From 1242687824caffae2ea481f29973fda9771f538f Mon Sep 17 00:00:00 2001 From: TomPGrid Date: Fri, 28 Feb 2025 14:13:13 +0100 Subject: [PATCH 39/68] add build image main stage --- Jenkinsfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 2339b4938..e503eef81 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -63,9 +63,9 @@ pipeline { } steps { script { - def docker_image=docker.build("main:8084/spring-petclinic:$GIT_COMMIT") - sh 'docker login -u "$REGISTRY_USER" -p "$REGISTRY_PASS" main:8084' - docker.withRegistry('http://main:8084') { + def docker_image=docker.build("main:8085/spring-petclinic:$GIT_COMMIT") + sh 'docker login -u "$REGISTRY_USER" -p "$REGISTRY_PASS" main:8085' + docker.withRegistry('http://main:8085') { docker_image.push() } } From 907b313c2c6c5304d577b9dbe75d97ac83269f55 Mon Sep 17 00:00:00 2001 From: TomPGrid Date: Fri, 28 Feb 2025 14:16:34 +0100 Subject: [PATCH 40/68] add build image main stage --- Jenkinsfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index e503eef81..8fdaaf5b4 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -63,9 +63,9 @@ pipeline { } steps { script { - def docker_image=docker.build("main:8085/spring-petclinic:$GIT_COMMIT") - sh 'docker login -u "$REGISTRY_USER" -p "$REGISTRY_PASS" main:8085' - docker.withRegistry('http://main:8085') { + def docker_image=docker.build("main:8083/spring-petclinic:$GIT_COMMIT") + sh 'docker login -u "$REGISTRY_USER" -p "$REGISTRY_PASS" main:8083' + docker.withRegistry('http://main:8083') { docker_image.push() } } From ec1f8096971abbb564a277dcf5f3c0510cea9b57 Mon Sep 17 00:00:00 2001 From: TomPGrid Date: Mon, 3 Mar 2025 13:40:47 +0100 Subject: [PATCH 41/68] change readme to test push --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index e15a3247f..5bb2d3a7d 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,8 @@ ## Understanding the Spring Petclinic application with a few diagrams +## TESTMESSAGE + [See the presentation here](https://speakerdeck.com/michaelisvy/spring-petclinic-sample-application) ## Run Petclinic locally From 96c76cd36238effb1632d6b992d36a9936d86610 Mon Sep 17 00:00:00 2001 From: TomPGrid Date: Mon, 3 Mar 2025 13:42:24 +0100 Subject: [PATCH 42/68] change readme to test push --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5bb2d3a7d..0c4c1410c 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,11 @@ # Spring PetClinic Sample Application [![Build Status](https://github.com/spring-projects/spring-petclinic/actions/workflows/maven-build.yml/badge.svg)](https://github.com/spring-projects/spring-petclinic/actions/workflows/maven-build.yml)[![Build Status](https://github.com/spring-projects/spring-petclinic/actions/workflows/gradle-build.yml/badge.svg)](https://github.com/spring-projects/spring-petclinic/actions/workflows/gradle-build.yml) + [![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/spring-projects/spring-petclinic) [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://github.com/codespaces/new?hide_repo_select=true&ref=main&repo=7517918) ## Understanding the Spring Petclinic application with a few diagrams -## TESTMESSAGE +## TSTMESSAGE [See the presentation here](https://speakerdeck.com/michaelisvy/spring-petclinic-sample-application) From 235dba9134eaacbaeeba4c0feb7c0f83fd2ae32e Mon Sep 17 00:00:00 2001 From: TomPGrid Date: Mon, 3 Mar 2025 13:43:38 +0100 Subject: [PATCH 43/68] change readme to test push --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0c4c1410c..9153520f2 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ ## Understanding the Spring Petclinic application with a few diagrams -## TSTMESSAGE +## TESTMESSAGE [See the presentation here](https://speakerdeck.com/michaelisvy/spring-petclinic-sample-application) From e0551b445b3a0281ac50ac4d5aa0dde114075d02 Mon Sep 17 00:00:00 2001 From: TomPGrid Date: Mon, 3 Mar 2025 14:14:08 +0100 Subject: [PATCH 44/68] modify build image main job in jenkinsfile --- Jenkinsfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 8fdaaf5b4..801ab8dc7 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -55,6 +55,9 @@ pipeline { } } stage('Build Image Main') { + when { + branch 'main' + } agent { docker { image 'docker:20.10.16' From 873d21dd7be04d46185fbe2af5c17cdf2ba7fd37 Mon Sep 17 00:00:00 2001 From: TomPGrid Date: Tue, 4 Mar 2025 10:27:13 +0100 Subject: [PATCH 45/68] modify checkstyle to run on pull request --- Jenkinsfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 801ab8dc7..4c6667d72 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -3,6 +3,9 @@ pipeline { stages { stage('Checkstyle') { + when { + changeRequest() + } agent { docker { image 'maven:3.8.5-openjdk-17' } } From 5119ea688e2a7ea623cd16212a08a309912e0767 Mon Sep 17 00:00:00 2001 From: TomPGrid Date: Tue, 4 Mar 2025 10:31:27 +0100 Subject: [PATCH 46/68] modify jobs go run on pull request only --- Jenkinsfile | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 4c6667d72..d22c2f937 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -20,6 +20,10 @@ pipeline { } } stage('Test') { + when { + changeRequest() + } + agent { docker { image 'maven:3.8.5-openjdk-17' } } @@ -28,6 +32,10 @@ pipeline { } } stage('Build') { + when { + changeRequest() + } + agent { docker { image 'maven:3.8.5-openjdk-17' } } @@ -41,6 +49,10 @@ pipeline { } } stage('Build Image') { + when { + changeRequest() + } + agent { docker { image 'docker:20.10.16' @@ -59,8 +71,9 @@ pipeline { } stage('Build Image Main') { when { - branch 'main' - } + not { changeRequest() } + } + agent { docker { image 'docker:20.10.16' From 189cc9da0e5b5b87222b4752901f2c12513a96f6 Mon Sep 17 00:00:00 2001 From: TomP101 <113848215+TomP101@users.noreply.github.com> Date: Tue, 4 Mar 2025 10:36:47 +0100 Subject: [PATCH 47/68] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9153520f2..374672865 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ ## Understanding the Spring Petclinic application with a few diagrams -## TESTMESSAGE +## TESTMESSAGE test test test [See the presentation here](https://speakerdeck.com/michaelisvy/spring-petclinic-sample-application) From 1d5b6a583872b6e30441336be59e5f0c484c6cf8 Mon Sep 17 00:00:00 2001 From: TomP101 <113848215+TomP101@users.noreply.github.com> Date: Tue, 4 Mar 2025 10:51:04 +0100 Subject: [PATCH 48/68] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 52bcf1112..ed99f7d76 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ ## Understanding the Spring Petclinic application with a few diagrams -## TESTMESSAGE test test test +## TESTMESSAGE test test test test test test [See the presentation here](https://speakerdeck.com/michaelisvy/spring-petclinic-sample-application) From 6d1236c2406d187ad8b70b02aa1694f965c5e27b Mon Sep 17 00:00:00 2001 From: TomPGrid Date: Tue, 4 Mar 2025 10:58:27 +0100 Subject: [PATCH 49/68] test change --- Jenkinsfile | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index d22c2f937..db05503f0 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -20,10 +20,7 @@ pipeline { } } stage('Test') { - when { - changeRequest() - } - + agent { docker { image 'maven:3.8.5-openjdk-17' } } From 92f79bde369316a064c75b28e8c13f17e11a5ca3 Mon Sep 17 00:00:00 2001 From: TomP101 <113848215+TomP101@users.noreply.github.com> Date: Tue, 4 Mar 2025 11:03:30 +0100 Subject: [PATCH 50/68] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ed99f7d76..3a98b0b2e 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ ## Understanding the Spring Petclinic application with a few diagrams -## TESTMESSAGE test test test test test test +## TESTMESSAGE [See the presentation here](https://speakerdeck.com/michaelisvy/spring-petclinic-sample-application) From 3cf9e0bb4c0312bdd3b7f022ec09d15317840b0f Mon Sep 17 00:00:00 2001 From: TomP101 <113848215+TomP101@users.noreply.github.com> Date: Tue, 4 Mar 2025 11:10:43 +0100 Subject: [PATCH 51/68] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3a98b0b2e..672fcf2fb 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ ## Understanding the Spring Petclinic application with a few diagrams -## TESTMESSAGE +## TESTMESSAGE tetst etsatters [See the presentation here](https://speakerdeck.com/michaelisvy/spring-petclinic-sample-application) From 41567ef0094bcd9062ded600225c22b8730100a2 Mon Sep 17 00:00:00 2001 From: TomP101 <113848215+TomP101@users.noreply.github.com> Date: Tue, 4 Mar 2025 11:14:03 +0100 Subject: [PATCH 52/68] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 672fcf2fb..3a98b0b2e 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ ## Understanding the Spring Petclinic application with a few diagrams -## TESTMESSAGE tetst etsatters +## TESTMESSAGE [See the presentation here](https://speakerdeck.com/michaelisvy/spring-petclinic-sample-application) From 3075c6e6f5dbdf0d1c9fa8eae5ca1aa1d598138e Mon Sep 17 00:00:00 2001 From: TomP101 <113848215+TomP101@users.noreply.github.com> Date: Tue, 4 Mar 2025 11:21:27 +0100 Subject: [PATCH 53/68] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3a98b0b2e..dcff36f36 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ ## Understanding the Spring Petclinic application with a few diagrams -## TESTMESSAGE +## TESTMESSAGE testastaseas [See the presentation here](https://speakerdeck.com/michaelisvy/spring-petclinic-sample-application) From 9389573375b6732ea2afe606c15f564872d5dfd8 Mon Sep 17 00:00:00 2001 From: TomP101 <113848215+TomP101@users.noreply.github.com> Date: Tue, 4 Mar 2025 11:24:21 +0100 Subject: [PATCH 54/68] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index dcff36f36..95245de40 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ ## Understanding the Spring Petclinic application with a few diagrams -## TESTMESSAGE testastaseas +## TESTMESSAGE testastaseasteatsraseas [See the presentation here](https://speakerdeck.com/michaelisvy/spring-petclinic-sample-application) From 7e893bfdf449a40f4cebafdf1ec7031cb798e371 Mon Sep 17 00:00:00 2001 From: TomPGrid Date: Tue, 4 Mar 2025 11:29:35 +0100 Subject: [PATCH 55/68] test change --- Jenkinsfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index db05503f0..d22c2f937 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -20,7 +20,10 @@ pipeline { } } stage('Test') { - + when { + changeRequest() + } + agent { docker { image 'maven:3.8.5-openjdk-17' } } From f504bd01196144c5964128b85ad8baff10b86e89 Mon Sep 17 00:00:00 2001 From: TomPGrid Date: Tue, 4 Mar 2025 13:12:35 +0100 Subject: [PATCH 56/68] changed readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 95245de40..3a98b0b2e 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ ## Understanding the Spring Petclinic application with a few diagrams -## TESTMESSAGE testastaseasteatsraseas +## TESTMESSAGE [See the presentation here](https://speakerdeck.com/michaelisvy/spring-petclinic-sample-application) From b8be03c5596063b30b4af7f3a0e772bbab25f6f5 Mon Sep 17 00:00:00 2001 From: TomP101 <113848215+TomP101@users.noreply.github.com> Date: Tue, 4 Mar 2025 14:20:56 +0100 Subject: [PATCH 57/68] Create main.yml --- .github/workflows/main.yml | 86 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 000000000..a759adea0 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,86 @@ +name: CI Pipeline + +on: + push: + branches: + - main + pull_request: + +jobs: + checkstyle: + if: github.event_name == 'pull_request' + runs-on: ubuntu-latest + container: + image: maven:3.8.5-openjdk-17 + steps: + - uses: actions/checkout@v3 + - name: Run Checkstyle + run: mvn checkstyle:checkstyle + - name: Upload Checkstyle Report + uses: actions/upload-artifact@v3 + with: + name: checkstyle-result + path: target/checkstyle-result.xml + + test: + if: github.event_name == 'pull_request' + runs-on: ubuntu-latest + container: + image: maven:3.8.5-openjdk-17 + needs: checkstyle + steps: + - uses: actions/checkout@v3 + - name: Run Tests + run: mvn test + + build: + if: github.event_name == 'pull_request' + runs-on: ubuntu-latest + container: + image: maven:3.8.5-openjdk-17 + needs: test + steps: + - uses: actions/checkout@v3 + - name: Build Package + run: mvn clean package -DskipTests + - name: Upload JAR Artifacts + uses: actions/upload-artifact@v3 + with: + name: jar-files + path: target/*.jar + + build_image: + if: github.event_name == 'pull_request' + runs-on: ubuntu-latest + needs: build + steps: + - uses: actions/checkout@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - name: Login to Registry (mr) + run: echo ${{ secrets.REGISTRY_PASS }} | docker login mr:8084 -u ${{ secrets.REGISTRY_USER }} --password-stdin + - name: Extract Short SHA + id: vars + run: echo "::set-output name=short_sha::$(echo $GITHUB_SHA | cut -c1-7)" + - name: Build Docker Image (mr) + run: docker build -t mr:8084/spring-petclinic:${{ steps.vars.outputs.short_sha }} . + - name: Push Docker Image (mr) + run: docker push mr:8084/spring-petclinic:${{ steps.vars.outputs.short_sha }} + + build_image_main: + if: github.ref == 'refs/heads/main' + runs-on: ubuntu-latest + needs: build + steps: + - uses: actions/checkout@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - name: Login to Registry (main) + run: echo ${{ secrets.REGISTRY_PASS }} | docker login main:8083 -u ${{ secrets.REGISTRY_USER }} --password-stdin + - name: Extract Short SHA + id: vars + run: echo "::set-output name=short_sha::$(echo $GITHUB_SHA | cut -c1-7)" + - name: Build Docker Image (main) + run: docker build -t main:8083/spring-petclinic:${{ steps.vars.outputs.short_sha }} . + - name: Push Docker Image (main) + run: docker push main:8083/spring-petclinic:${{ steps.vars.outputs.short_sha }} From ca2ce0b7359559facca4eff96f13d33a4e7e70bf Mon Sep 17 00:00:00 2001 From: TomP101 <113848215+TomP101@users.noreply.github.com> Date: Tue, 4 Mar 2025 14:24:37 +0100 Subject: [PATCH 58/68] Delete .github/workflows/gradle-build.yml --- .github/workflows/gradle-build.yml | 31 ------------------------------ 1 file changed, 31 deletions(-) delete mode 100644 .github/workflows/gradle-build.yml diff --git a/.github/workflows/gradle-build.yml b/.github/workflows/gradle-build.yml deleted file mode 100644 index c24c121b1..000000000 --- a/.github/workflows/gradle-build.yml +++ /dev/null @@ -1,31 +0,0 @@ -# This workflow will build a Java project with Gradle, and cache/restore any dependencies to improve the workflow execution time -# For more information see: https://docs.github.com/en/actions/use-cases-and-examples/building-and-testing/building-and-testing-java-with-gradle - -name: Java CI with Gradle - -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] - -jobs: - build: - - runs-on: ubuntu-latest - strategy: - matrix: - java: [ '17' ] - - steps: - - uses: actions/checkout@v4 - - name: Set up JDK ${{matrix.java}} - uses: actions/setup-java@v4 - with: - java-version: ${{matrix.java}} - distribution: 'adopt' - cache: maven - - name: Setup Gradle - uses: gradle/actions/setup-gradle@v4 - - name: Build with Gradle - run: ./gradlew build From 093e6e6f5dd0f167bcafb4b65fefe2f102471ae2 Mon Sep 17 00:00:00 2001 From: TomP101 <113848215+TomP101@users.noreply.github.com> Date: Tue, 4 Mar 2025 14:24:48 +0100 Subject: [PATCH 59/68] Delete .github/workflows/maven-build.yml --- .github/workflows/maven-build.yml | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100644 .github/workflows/maven-build.yml diff --git a/.github/workflows/maven-build.yml b/.github/workflows/maven-build.yml deleted file mode 100644 index a1ec4dab7..000000000 --- a/.github/workflows/maven-build.yml +++ /dev/null @@ -1,29 +0,0 @@ -# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time -# For more information see: https://docs.github.com/en/actions/use-cases-and-examples/building-and-testing/building-and-testing-java-with-maven - -name: Java CI with Maven - -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] - -jobs: - build: - - runs-on: ubuntu-latest - strategy: - matrix: - java: [ '17' ] - - steps: - - uses: actions/checkout@v4 - - name: Set up JDK ${{matrix.java}} - uses: actions/setup-java@v4 - with: - java-version: ${{matrix.java}} - distribution: 'adopt' - cache: maven - - name: Build with Maven Wrapper - run: ./mvnw -B verify From 8462675a5c790ea4778b5a17fae33688da6dc576 Mon Sep 17 00:00:00 2001 From: TomP101 <113848215+TomP101@users.noreply.github.com> Date: Tue, 4 Mar 2025 14:29:33 +0100 Subject: [PATCH 60/68] Update main.yml --- .github/workflows/main.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a759adea0..70cf52694 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,7 +13,7 @@ jobs: container: image: maven:3.8.5-openjdk-17 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Run Checkstyle run: mvn checkstyle:checkstyle - name: Upload Checkstyle Report @@ -29,7 +29,7 @@ jobs: image: maven:3.8.5-openjdk-17 needs: checkstyle steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Run Tests run: mvn test @@ -40,7 +40,7 @@ jobs: image: maven:3.8.5-openjdk-17 needs: test steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Build Package run: mvn clean package -DskipTests - name: Upload JAR Artifacts @@ -54,7 +54,7 @@ jobs: runs-on: ubuntu-latest needs: build steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 - name: Login to Registry (mr) @@ -72,7 +72,7 @@ jobs: runs-on: ubuntu-latest needs: build steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 - name: Login to Registry (main) From 9331548281226ce4dc8864946dea3284212fed3e Mon Sep 17 00:00:00 2001 From: TomP101 <113848215+TomP101@users.noreply.github.com> Date: Tue, 4 Mar 2025 14:32:56 +0100 Subject: [PATCH 61/68] Update main.yml --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 70cf52694..3febca735 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -17,7 +17,7 @@ jobs: - name: Run Checkstyle run: mvn checkstyle:checkstyle - name: Upload Checkstyle Report - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: checkstyle-result path: target/checkstyle-result.xml @@ -44,7 +44,7 @@ jobs: - name: Build Package run: mvn clean package -DskipTests - name: Upload JAR Artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: jar-files path: target/*.jar From 1f436abce19fa3bb8f06e82cec170391b64487e4 Mon Sep 17 00:00:00 2001 From: TomP101 <113848215+TomP101@users.noreply.github.com> Date: Tue, 4 Mar 2025 14:42:47 +0100 Subject: [PATCH 62/68] Update main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3febca735..27c7e4a57 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -31,7 +31,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Run Tests - run: mvn test + run: mvn test -Dmaven.test.failure.ignore=true build: if: github.event_name == 'pull_request' From dbb361571bbe8c481059f292035f93e439a5b623 Mon Sep 17 00:00:00 2001 From: TomP101 <113848215+TomP101@users.noreply.github.com> Date: Wed, 5 Mar 2025 09:40:35 +0100 Subject: [PATCH 63/68] Update main.yml --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 27c7e4a57..992f18866 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -58,7 +58,7 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 - name: Login to Registry (mr) - run: echo ${{ secrets.REGISTRY_PASS }} | docker login mr:8084 -u ${{ secrets.REGISTRY_USER }} --password-stdin + run: docker login mr:8084 -u ${{ secrets.REGISTRY_USER }} -p ${{ secrets.REGISTRY_PASS }} - name: Extract Short SHA id: vars run: echo "::set-output name=short_sha::$(echo $GITHUB_SHA | cut -c1-7)" @@ -76,7 +76,7 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 - name: Login to Registry (main) - run: echo ${{ secrets.REGISTRY_PASS }} | docker login main:8083 -u ${{ secrets.REGISTRY_USER }} --password-stdin + run: docker login main:8083 -u ${{ secrets.REGISTRY_USER }} -p ${{ secrets.REGISTRY_PASS }} - name: Extract Short SHA id: vars run: echo "::set-output name=short_sha::$(echo $GITHUB_SHA | cut -c1-7)" From 2c0601e951a97c78ec7b2c33eba2acc4be5046cf Mon Sep 17 00:00:00 2001 From: TomP101 <113848215+TomP101@users.noreply.github.com> Date: Wed, 5 Mar 2025 09:41:14 +0100 Subject: [PATCH 64/68] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3a98b0b2e..e73f62e16 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ ## Understanding the Spring Petclinic application with a few diagrams -## TESTMESSAGE +## TESTMESSAGE asdasdasda [See the presentation here](https://speakerdeck.com/michaelisvy/spring-petclinic-sample-application) From c4fa9761de792f6e32ef6a6b74af457693f83b0a Mon Sep 17 00:00:00 2001 From: TomP101 <113848215+TomP101@users.noreply.github.com> Date: Wed, 5 Mar 2025 09:51:16 +0100 Subject: [PATCH 65/68] Update main.yml --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 992f18866..d817fd06c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -58,7 +58,7 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 - name: Login to Registry (mr) - run: docker login mr:8084 -u ${{ secrets.REGISTRY_USER }} -p ${{ secrets.REGISTRY_PASS }} + run: docker login mr:8084 -u ${{ vars.REGISTRY_USER }} -p ${{ vars.REGISTRY_PASS }} - name: Extract Short SHA id: vars run: echo "::set-output name=short_sha::$(echo $GITHUB_SHA | cut -c1-7)" @@ -76,7 +76,7 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 - name: Login to Registry (main) - run: docker login main:8083 -u ${{ secrets.REGISTRY_USER }} -p ${{ secrets.REGISTRY_PASS }} + run: docker login main:8083 -u ${{ vars.REGISTRY_USER }} -p ${{ vars.REGISTRY_PASS }} - name: Extract Short SHA id: vars run: echo "::set-output name=short_sha::$(echo $GITHUB_SHA | cut -c1-7)" From e0d5682f10822a7f7fab20b51bcd2e6aefbdb11a Mon Sep 17 00:00:00 2001 From: TomP101 <113848215+TomP101@users.noreply.github.com> Date: Wed, 5 Mar 2025 10:05:10 +0100 Subject: [PATCH 66/68] Update main.yml --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d817fd06c..9fd05ecd6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -51,7 +51,7 @@ jobs: build_image: if: github.event_name == 'pull_request' - runs-on: ubuntu-latest + runs-on: self-hosted needs: build steps: - uses: actions/checkout@v4 @@ -69,7 +69,7 @@ jobs: build_image_main: if: github.ref == 'refs/heads/main' - runs-on: ubuntu-latest + runs-on: self-hosted needs: build steps: - uses: actions/checkout@v4 From 8e279057f58467d37e85191ee003d666d7f12afe Mon Sep 17 00:00:00 2001 From: TomP101 <113848215+TomP101@users.noreply.github.com> Date: Wed, 5 Mar 2025 10:23:25 +0100 Subject: [PATCH 67/68] Update main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9fd05ecd6..b5e0be1e4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -68,7 +68,7 @@ jobs: run: docker push mr:8084/spring-petclinic:${{ steps.vars.outputs.short_sha }} build_image_main: - if: github.ref == 'refs/heads/main' + if: github.ref == 'refs/heads/master' runs-on: self-hosted needs: build steps: From d8f2bdb1a1be9dfd3d1afb29c130b88157762a4b Mon Sep 17 00:00:00 2001 From: TomP101 <113848215+TomP101@users.noreply.github.com> Date: Wed, 5 Mar 2025 10:24:05 +0100 Subject: [PATCH 68/68] Update main.yml --- .github/workflows/main.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b5e0be1e4..cbac5d443 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -68,9 +68,8 @@ jobs: run: docker push mr:8084/spring-petclinic:${{ steps.vars.outputs.short_sha }} build_image_main: - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' runs-on: self-hosted - needs: build steps: - uses: actions/checkout@v4 - name: Set up Docker Buildx