From abf19ec138bea1c9150dc07271b5d4c06b7f018a Mon Sep 17 00:00:00 2001 From: sebr72 Date: Fri, 8 Nov 2024 11:21:58 +0100 Subject: [PATCH 1/6] Use java 17 version --- Dockerfile | 2 +- build.gradle | 5 ++--- core/Dockerfile | 2 +- core/docker/usr/local/tomcat/bin/docker-start-print | 1 + 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 755e4e8baa..c346140222 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM gradle:8.10.2-jdk11 AS builder +FROM gradle:8.10.2-jdk17 AS builder RUN --mount=type=cache,target=/var/cache,sharing=locked \ --mount=type=cache,target=/root/.cache \ diff --git a/build.gradle b/build.gradle index 87c3bd9b6a..bb68afd5f0 100644 --- a/build.gradle +++ b/build.gradle @@ -52,8 +52,8 @@ configure(subprojects.findAll { ['core', 'examples'].contains(it.name) }) { reportLevel = "high" } - sourceCompatibility = JavaVersion.VERSION_11 - targetCompatibility = JavaVersion.VERSION_11 + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 compileJava.options.compilerArgs = ['-Xlint:deprecation', '-Xlint:unchecked'] @@ -65,7 +65,6 @@ configure(subprojects.findAll { ['core', 'examples'].contains(it.name) }) { } test { - jvmArgs '-XX:+CMSClassUnloadingEnabled' minHeapSize = "128m" maxHeapSize = "512m" testLogging { diff --git a/core/Dockerfile b/core/Dockerfile index f5e3d8416d..98eafc2f40 100644 --- a/core/Dockerfile +++ b/core/Dockerfile @@ -1,6 +1,6 @@ FROM mapfish_print_builder AS builder -FROM tomcat:9.0.96-jdk11-temurin-jammy AS runner +FROM tomcat:9.0.96-jdk17-temurin-jammy AS runner LABEL maintainer="Camptocamp " RUN --mount=type=cache,target=/var/cache,sharing=locked \ diff --git a/core/docker/usr/local/tomcat/bin/docker-start-print b/core/docker/usr/local/tomcat/bin/docker-start-print index f96c53fa65..291c822c2b 100755 --- a/core/docker/usr/local/tomcat/bin/docker-start-print +++ b/core/docker/usr/local/tomcat/bin/docker-start-print @@ -2,6 +2,7 @@ cd /usr/local/tomcat/webapps/ROOT PG_LIB=$(find WEB-INF/lib -name "postgresql-*") +# Checks if Database is present (DB is compulsory in cluster mode) if java ${CATALINA_OPTS} -cp WEB-INF/classes/:$PG_LIB org.mapfish.print.WaitDB; then cp WEB-INF/classes/mapfish-spring-application-context-override-db.xml \ WEB-INF/classes/mapfish-spring-application-context-override.xml From 2f2280f80203001abe0e14784f9978a25bf357ff Mon Sep 17 00:00:00 2001 From: sebr72 Date: Fri, 8 Nov 2024 11:55:40 +0100 Subject: [PATCH 2/6] Disable Documentation site creation --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index c346140222..18df42d809 100644 --- a/Dockerfile +++ b/Dockerfile @@ -31,10 +31,10 @@ RUN --mount=type=cache,target=/home/gradle/.gradle \ gradle --parallel --exclude-task=:core:test \ --exclude-task=:core:spotbugsMain --exclude-task=:core:checkstyleMain \ --exclude-task=:core:spotbugsTest --exclude-task=:core:checkstyleTest --exclude-task=:core:testCLI \ - :core:build :core:explodedWar :publish:build :examples:build :docs:buildDocs :core:libSourcesJar :core:libJavadocJar + :core:build :core:explodedWar :publish:build :examples:build :core:libSourcesJar :core:libJavadocJar RUN mkdir -p core/build/resources/test/org/mapfish/print/ \ - && chmod -R go=u /home/gradle /tmp/mapfish-print/ . \ + && chmod -R go=u /home/gradle . \ && chmod o+t -R core/build/resources # Backup cache From f1070f8d7ac2249fbba2bf199b69b47deaedac60 Mon Sep 17 00:00:00 2001 From: sebr72 Date: Fri, 8 Nov 2024 12:48:45 +0100 Subject: [PATCH 3/6] Enable unnamed module to up sun.awt lib in unit tests --- build.gradle | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index bb68afd5f0..43beb5e340 100644 --- a/build.gradle +++ b/build.gradle @@ -65,8 +65,9 @@ configure(subprojects.findAll { ['core', 'examples'].contains(it.name) }) { } test { + jvmArgs '--add-opens=java.desktop/sun.awt.image=ALL-UNNAMED' minHeapSize = "128m" - maxHeapSize = "512m" + maxHeapSize = "768m" testLogging { exceptionFormat = 'full' } From cbfc96e0ca7900e6c702d81e5b8f2efaf45d1696 Mon Sep 17 00:00:00 2001 From: sebr72 Date: Fri, 8 Nov 2024 14:17:05 +0100 Subject: [PATCH 4/6] Enable unnamed module to up sun.awt lib in CI tests --- core/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/Dockerfile b/core/Dockerfile index 98eafc2f40..b9c860ad7b 100644 --- a/core/Dockerfile +++ b/core/Dockerfile @@ -43,7 +43,7 @@ ENV LOG_LEVEL=INFO \ TOMCAT_LOG_TYPE=classic \ EXTRA_JARS= \ PRINT_YAML_MAX_ALIASES=50 \ - JAVA_OPTS=-Dsun.net.inetaddr.ttl=30 \ + JAVA_OPTS="--add-opens=java.desktop/sun.awt.image=ALL-UNNAMED -Dsun.net.inetaddr.ttl=30" \ SENTRY_DSN= CMD ["/usr/local/tomcat/bin/docker-start-print"] From bf7dc870dc5e9e003aa7b84219c8a8bd50a1bf13 Mon Sep 17 00:00:00 2001 From: "geo-ghci-int[bot]" <146321879+geo-ghci-int[bot]@users.noreply.github.com> Date: Fri, 8 Nov 2024 13:35:16 +0000 Subject: [PATCH 5/6] Update dpkg versions list From the artifact of the previous workflow run --- ci/dpkg-versions.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ci/dpkg-versions.yaml b/ci/dpkg-versions.yaml index 432f534489..26f265fcc6 100644 --- a/ci/dpkg-versions.yaml +++ b/ci/dpkg-versions.yaml @@ -3,6 +3,9 @@ camptocamp/mapfish_print:latest: ubuntu_22_04/apt: 2.4.11 ubuntu_22_04/base-passwd: 3.5.52build1 ubuntu_22_04/bash: 5.1-6ubuntu1 + ubuntu_22_04/binutils: 2.38-4ubuntu2.6 + ubuntu_22_04/binutils-common: 2.38-4ubuntu2.6 + ubuntu_22_04/binutils-x86-64-linux-gnu: 2.38-4ubuntu2.6 ubuntu_22_04/bsdutils: 1:2.37.2-4ubuntu3 ubuntu_22_04/ca-certificates: 20230311ubuntu0.22.04.1 ubuntu_22_04/coreutils: 8.32-4.1ubuntu1 @@ -43,6 +46,7 @@ camptocamp/mapfish_print:latest: ubuntu_22_04/libattr1: 1:2.5.1-1build1 ubuntu_22_04/libaudit-common: 1:3.0.7-1build1 ubuntu_22_04/libaudit1: 1:3.0.7-1build1 + ubuntu_22_04/libbinutils: 2.38-4ubuntu2.6 ubuntu_22_04/libblkid1: 2.37.2-4ubuntu3 ubuntu_22_04/libbrotli1: 1.0.9-2build6 ubuntu_22_04/libbz2-1.0: 1.0.8-5build1 @@ -52,6 +56,8 @@ camptocamp/mapfish_print:latest: ubuntu_22_04/libcap2: 1:2.44-1ubuntu0.22.04.1 ubuntu_22_04/libcom-err2: 1.46.5-2ubuntu1.1 ubuntu_22_04/libcrypt1: 1:4.4.27-1 + ubuntu_22_04/libctf-nobfd0: 2.38-4ubuntu2.6 + ubuntu_22_04/libctf0: 2.38-4ubuntu2.6 ubuntu_22_04/libcurl4: 7.81.0-1ubuntu1.15 ubuntu_22_04/libdb5.3: 5.3.28+dfsg1-0.8ubuntu3 ubuntu_22_04/libdebconfclient0: 0.261ubuntu1 From 6105aa25e69c7a91eaf1e9eae8cc953d3eb016c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Brunner?= Date: Fri, 8 Nov 2024 17:24:19 +0100 Subject: [PATCH 6/6] Fix acceptance-tests-down, no more used data --- .github/workflows/main.yaml | 1 + Makefile | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 14f95b7425..aab20d8e01 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -129,6 +129,7 @@ jobs: - run: make acceptance-tests-up - run: make acceptance-tests-run + - run: make acceptance-tests-down - run: c2cciutils-docker-logs || true if: always() diff --git a/Makefile b/Makefile index 922699f9bc..99cbfa4c3b 100644 --- a/Makefile +++ b/Makefile @@ -64,9 +64,6 @@ acceptance-tests-run: .env .PHONY: acceptance-tests-down acceptance-tests-down: .env docker compose down || true - docker run --rm --volume=/tmp/geoserver-data:/mnt/geoserver_datadir camptocamp/geoserver \ - bash -c 'rm -rf /mnt/geoserver_datadir/*' - rmdir /tmp/geoserver-data .PHONY: dist dist: build-builder