From 68254f2375a156d18c8549f11df1585d99cac3e4 Mon Sep 17 00:00:00 2001 From: Norbert Pomaroli Date: Thu, 10 Oct 2024 15:38:59 +0200 Subject: [PATCH 1/4] Scan docker images --- Jenkinsfile.split | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Jenkinsfile.split b/Jenkinsfile.split index 8dac7e8646..45fd78c0a7 100644 --- a/Jenkinsfile.split +++ b/Jenkinsfile.split @@ -21,6 +21,7 @@ properties([ booleanParam(name: 'runDeploy', defaultValue: false, description: "Whether to run the deploy steps."), booleanParam(name: 'runDeployTesting', defaultValue: false, description: "Whether to run the testing deploy steps."), booleanParam(name: 'runDocker', defaultValue: false, description: "Whether to run the docker steps."), + booleanParam(name: 'omitScan', defaultValue: false, description: "Omit scanning the docker images"), booleanParam(name: 'runMavenBuild', defaultValue: false, description: "Whether to run the maven build steps."), booleanParam(name: 'runIntegrationTests', defaultValue: false, description: "Whether to run integration tests."), booleanParam(name: 'consistencyChecks', defaultValue: false, description: "Whether to do consistency checks for every test. Enabling this will increase overall test runtime."), @@ -347,10 +348,21 @@ stage("Setup Build Environment") { sh "rm server/target/*sources.jar || true" sh "rm server/target/*javadoc.jar || true" sh "cd server ; docker build --network=host -t " + registryHost + "/gentics/mesh:latest -t " + registryHost + "/gentics/mesh:" + version + " . ; cd .. " + + if (!params.omitScan) { + scanImage image: registryHost + "/gentics/mesh:" + version, exitCode: 1 + } + // connectors def mavenVersion = MavenHelper.getVersion() sh "cd .docker ; cp ../connectors/hsqldb/target/mesh-database-connector-hsqldb-" + mavenVersion + ".jar ./mesh-connector.jar ; docker build --network=host -t " + registryHost + "/gentics/mesh-hsqldb:latest -t " + registryHost + "/gentics/mesh-hsqldb:" + version + " --build-arg MESH_VERSION=" + version + " --build-arg MESH_REGISTRY_HOST=" + registryHost + " . ; rm -f mesh-connector.jar ; cd .." sh "cd .docker ; cp ../connectors/mariadb/target/mesh-database-connector-mariadb-" + mavenVersion + ".jar ./mesh-connector.jar ; docker build --network=host -t " + registryHost + "/gentics/mesh-mariadb:latest -t " + registryHost + "/gentics/mesh-mariadb:" + version + " --build-arg MESH_VERSION=" + version + " --build-arg MESH_REGISTRY_HOST=" + registryHost + " . ; rm -f mesh-connector.jar ; cd .." + + if (!params.omitScan) { + scanImage image: registryHost + "/gentics/mesh-hsqldb:" + version, exitCode: 1 + scanImage image: registryHost + "/gentics/mesh-mariadb:" + version, exitCode: 1 + } + } else { echo "Docker build skipped.." } From 3d54604649932506429d86c81ace07ae43e1e3f8 Mon Sep 17 00:00:00 2001 From: Norbert Pomaroli Date: Thu, 10 Oct 2024 15:39:10 +0200 Subject: [PATCH 2/4] Update some dependencies --- bom/pom.xml | 20 +++++++++++++++++-- connectors/hsqldb/pom.xml | 1 - database-tests/common/pom.xml | 1 - test-scanner/pom.xml | 2 +- tests/common/pom.xml | 3 +-- .../gentics/mesh/maven/MavenUtilities.java | 6 +++--- tests/pom.xml | 3 +-- 7 files changed, 24 insertions(+), 12 deletions(-) diff --git a/bom/pom.xml b/bom/pom.xml index 58e6593dbc..6f1065511f 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -24,7 +24,7 @@ 3.0.3 3.11.0 3.3.1 - 5.5.7 + 6.3.3 1.1.1 3.12.13 2.17.0 @@ -43,6 +43,7 @@ 1.12.9 3.10.18 4.3.1 + 2.7.3 @@ -120,6 +121,11 @@ commons-codec 1.15 + + commons-beanutils + commons-beanutils + 1.9.4 + @@ -241,7 +247,7 @@ org.skyscreamer jsonassert - 1.3.0 + 1.5.3 org.simpleframework @@ -258,6 +264,11 @@ toxiproxy ${testcontainers.version} + + org.jdom + jdom2 + 2.0.6.1 + @@ -536,6 +547,11 @@ mesh-database-connector-common ${project.version} + + org.hsqldb + hsqldb + ${hsqldb.version} + diff --git a/connectors/hsqldb/pom.xml b/connectors/hsqldb/pom.xml index e337b344a5..d372499382 100644 --- a/connectors/hsqldb/pom.xml +++ b/connectors/hsqldb/pom.xml @@ -23,7 +23,6 @@ org.hsqldb hsqldb - 2.6.1 com.gentics.mesh diff --git a/database-tests/common/pom.xml b/database-tests/common/pom.xml index 306c62b302..e1065b1bbc 100644 --- a/database-tests/common/pom.xml +++ b/database-tests/common/pom.xml @@ -48,7 +48,6 @@ org.hsqldb hsqldb - 2.6.1 diff --git a/test-scanner/pom.xml b/test-scanner/pom.xml index fdb7c999f4..2037a696a8 100644 --- a/test-scanner/pom.xml +++ b/test-scanner/pom.xml @@ -49,7 +49,7 @@ org.apache.maven.surefire maven-surefire-common - 3.0.0-M5 + 3.5.1 diff --git a/tests/common/pom.xml b/tests/common/pom.xml index 304b78d6fa..fd0e3a1d24 100644 --- a/tests/common/pom.xml +++ b/tests/common/pom.xml @@ -92,8 +92,7 @@ org.jdom - jdom - 1.1 + jdom2 jar diff --git a/tests/common/src/main/java/com/gentics/mesh/maven/MavenUtilities.java b/tests/common/src/main/java/com/gentics/mesh/maven/MavenUtilities.java index 9117aee80b..c6485c0076 100644 --- a/tests/common/src/main/java/com/gentics/mesh/maven/MavenUtilities.java +++ b/tests/common/src/main/java/com/gentics/mesh/maven/MavenUtilities.java @@ -8,9 +8,9 @@ import java.util.Iterator; import java.util.List; -import org.jdom.Document; -import org.jdom.Element; -import org.jdom.input.SAXBuilder; +import org.jdom2.Document; +import org.jdom2.Element; +import org.jdom2.input.SAXBuilder; public final class MavenUtilities { diff --git a/tests/pom.xml b/tests/pom.xml index 17e28ba15a..27360115d5 100644 --- a/tests/pom.xml +++ b/tests/pom.xml @@ -109,8 +109,7 @@ org.jdom - jdom - 1.1 + jdom2 jar From 052eea885479162251f965fda81221c6caea4b7f Mon Sep 17 00:00:00 2001 From: Norbert Pomaroli Date: Thu, 10 Oct 2024 15:52:23 +0200 Subject: [PATCH 3/4] Fix indentation --- Jenkinsfile.split | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Jenkinsfile.split b/Jenkinsfile.split index 45fd78c0a7..f7d1abb747 100644 --- a/Jenkinsfile.split +++ b/Jenkinsfile.split @@ -350,18 +350,18 @@ stage("Setup Build Environment") { sh "cd server ; docker build --network=host -t " + registryHost + "/gentics/mesh:latest -t " + registryHost + "/gentics/mesh:" + version + " . ; cd .. " if (!params.omitScan) { - scanImage image: registryHost + "/gentics/mesh:" + version, exitCode: 1 - } + scanImage image: registryHost + "/gentics/mesh:" + version, exitCode: 1 + } // connectors def mavenVersion = MavenHelper.getVersion() sh "cd .docker ; cp ../connectors/hsqldb/target/mesh-database-connector-hsqldb-" + mavenVersion + ".jar ./mesh-connector.jar ; docker build --network=host -t " + registryHost + "/gentics/mesh-hsqldb:latest -t " + registryHost + "/gentics/mesh-hsqldb:" + version + " --build-arg MESH_VERSION=" + version + " --build-arg MESH_REGISTRY_HOST=" + registryHost + " . ; rm -f mesh-connector.jar ; cd .." sh "cd .docker ; cp ../connectors/mariadb/target/mesh-database-connector-mariadb-" + mavenVersion + ".jar ./mesh-connector.jar ; docker build --network=host -t " + registryHost + "/gentics/mesh-mariadb:latest -t " + registryHost + "/gentics/mesh-mariadb:" + version + " --build-arg MESH_VERSION=" + version + " --build-arg MESH_REGISTRY_HOST=" + registryHost + " . ; rm -f mesh-connector.jar ; cd .." - if (!params.omitScan) { - scanImage image: registryHost + "/gentics/mesh-hsqldb:" + version, exitCode: 1 + if (!params.omitScan) { + scanImage image: registryHost + "/gentics/mesh-hsqldb:" + version, exitCode: 1 scanImage image: registryHost + "/gentics/mesh-mariadb:" + version, exitCode: 1 - } + } } else { echo "Docker build skipped.." From 336d00824aa01813a2ac5a87009b16bc829b7d24 Mon Sep 17 00:00:00 2001 From: Norbert Pomaroli Date: Mon, 14 Oct 2024 11:54:39 +0200 Subject: [PATCH 4/4] Fix repositories for test plugins --- tests/tests-core/src/test/plugins/pom.xml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/tests/tests-core/src/test/plugins/pom.xml b/tests/tests-core/src/test/plugins/pom.xml index b521906d79..f499c4ec0b 100644 --- a/tests/tests-core/src/test/plugins/pom.xml +++ b/tests/tests-core/src/test/plugins/pom.xml @@ -33,12 +33,23 @@ - maven.gentics.com - Gentics Maven Repository - https://maven.gentics.com/maven2 + gentics.nexus.releases-oss + Gentics Nexus OSS Maven Repository + https://repo.gentics.com/repository/maven-releases-oss/ true + + false + + + + gentics.nexus.snapshots + Gentics Snapshots Repository + https://repo.gentics.com/repository/maven-snapshots/ + + false + true