diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 20c588f438..4a45e0353e 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -48,11 +48,11 @@ jobs: # If you wish to specify custom queries, you can do so here or in a config file. # By default, queries listed here will override any specified in a config file. # Prefix the list here with "+" to use these queries and those in the config file. - + # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs # queries: security-extended,security-and-quality - + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild @@ -61,7 +61,7 @@ jobs: # â„šī¸ Command-line programs to run using the OS shell. # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun - # If the Autobuild fails above, remove it and uncomment the following three lines. + # If the Autobuild fails above, remove it and uncomment the following three lines. # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. # - run: | diff --git a/.github/workflows/mvn-deploy.yml b/.github/workflows/mvn-deploy.yml index 0e17a16f76..78c0fa9d00 100644 --- a/.github/workflows/mvn-deploy.yml +++ b/.github/workflows/mvn-deploy.yml @@ -37,7 +37,7 @@ jobs: server-password: MAVEN_PASSWORD - name: Publish to OSS and Docker hub - run: mvn deploy -Pintegration -Pcoverage -Pdeploy -Pdocker --batch-mode --errors --fail-at-end --show-version --file pom.xml + run: mvn deploy -Pintegration -Pcoverage -Pdeploy -Pdocker -pl !e2e --batch-mode --errors --fail-at-end --show-version --file pom.xml env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} diff --git a/.github/workflows/mvn-test.yml b/.github/workflows/mvn-test.yml index cbcb1afca3..3b8de7ef58 100644 --- a/.github/workflows/mvn-test.yml +++ b/.github/workflows/mvn-test.yml @@ -43,6 +43,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: E2E Test + if: success() run: mvn verify -pl e2e env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/e2e/pom.xml b/e2e/pom.xml index 3995196166..52d8e3ecb2 100644 --- a/e2e/pom.xml +++ b/e2e/pom.xml @@ -51,6 +51,12 @@ + + org.junit.jupiter + junit-jupiter + ${junit.jupiter.version} + test + org.testcontainers testcontainers diff --git a/e2e/src/test/java/com/arcadedb/e2e/ArcadeContainerTemplate.java b/e2e/src/test/java/com/arcadedb/e2e/ArcadeContainerTemplate.java index fa4c468a70..83d0569dc7 100644 --- a/e2e/src/test/java/com/arcadedb/e2e/ArcadeContainerTemplate.java +++ b/e2e/src/test/java/com/arcadedb/e2e/ArcadeContainerTemplate.java @@ -24,23 +24,21 @@ import java.time.*; public abstract class ArcadeContainerTemplate { - static final GenericContainer ARCADE; + static final GenericContainer ARCADE; - static { - ARCADE = new GenericContainer("arcadedata/arcadedb:latest").withExposedPorts(2480, 6379, 5432, 8182)// - .withStartupTimeout(Duration.ofSeconds(90))// - .withEnv("arcadedb.server.rootPassword", "playwithdata") - .withEnv("arcadedb.server.defaultDatabases", "beer[root]{import:https://github.com/ArcadeData/arcadedb-datasets/raw/main/orientdb/OpenBeer.gz}") - .withEnv("arcadedb.server.plugins", "Redis:com.arcadedb.redis.RedisProtocolPlugin, " +// - "MongoDB:com.arcadedb.mongo.MongoDBProtocolPlugin, " +// - "Postgres:com.arcadedb.postgres.PostgresProtocolPlugin, " +// - "GremlinServer:com.arcadedb.server.gremlin.GremlinServerPlugin").waitingFor(Wait.forListeningPort()); - ARCADE.start(); - } + static { + ARCADE = new GenericContainer("arcadedata/arcadedb:latest").withExposedPorts(2480, 6379, 5432, 8182)// + .withStartupTimeout(Duration.ofSeconds(90)) + .withEnv("JAVA_OPTS", "-Darcadedb.server.rootPassword=playwithdata " + + "-Darcadedb.server.defaultDatabases=beer[root]{import:https://github.com/ArcadeData/arcadedb-datasets/raw/main/orientdb/OpenBeer.gz} " + + "-Darcadedb.server.plugins=Redis:com.arcadedb.redis.RedisProtocolPlugin,MongoDB:com.arcadedb.mongo.MongoDBProtocolPlugin,Postgres:com.arcadedb.postgres.PostgresProtocolPlugin,GremlinServer:com.arcadedb.server.gremlin.GremlinServerPlugin") + .waitingFor(Wait.forListeningPort()); + ARCADE.start(); + } - protected String host = ARCADE.getHost(); - protected int httpPort = ARCADE.getMappedPort(2480); - protected int redisPort = ARCADE.getMappedPort(6379); - protected int pgsqlPort = ARCADE.getMappedPort(5432); - protected int gremlinPort = ARCADE.getMappedPort(8182); + protected String host = ARCADE.getHost(); + protected int httpPort = ARCADE.getMappedPort(2480); + protected int redisPort = ARCADE.getMappedPort(6379); + protected int pgsqlPort = ARCADE.getMappedPort(5432); + protected int gremlinPort = ARCADE.getMappedPort(8182); } diff --git a/engine/src/main/java/com/arcadedb/log/LogManager.java b/engine/src/main/java/com/arcadedb/log/LogManager.java index 5dd8a504a2..6af674b7de 100644 --- a/engine/src/main/java/com/arcadedb/log/LogManager.java +++ b/engine/src/main/java/com/arcadedb/log/LogManager.java @@ -28,7 +28,7 @@ public class LogManager { private static final LogManager instance = new LogManager(); private boolean debug = false; - private Logger logger = new DefaultLogger(); + private Logger logger; static class LogContext extends ThreadLocal { } @@ -36,6 +36,7 @@ static class LogContext extends ThreadLocal { public static final LogContext CONTEXT_INSTANCE = new LogContext(); protected LogManager() { + logger = new DefaultLogger(); } public static LogManager instance() { diff --git a/engine/src/main/resources/arcadedb-log.properties b/engine/src/main/resources/arcadedb-log.properties index 40ed2e04db..573d543e86 100644 --- a/engine/src/main/resources/arcadedb-log.properties +++ b/engine/src/main/resources/arcadedb-log.properties @@ -36,7 +36,7 @@ java.util.logging.ConsoleHandler.formatter = com.arcadedb.utility.AnsiLogFormatt # Set the default logging level for new FileHandler instances java.util.logging.FileHandler.level = INFO # Naming style for the output file -java.util.logging.FileHandler.pattern=log/arcadedb.log +java.util.logging.FileHandler.pattern=./log/arcadedb.log # Set the default formatter for new FileHandler instances java.util.logging.FileHandler.formatter = com.arcadedb.log.LogFormatter # Limiting size of output file in bytes: diff --git a/package/pom.xml b/package/pom.xml index a4df03d92a..c0dc77677b 100644 --- a/package/pom.xml +++ b/package/pom.xml @@ -26,6 +26,10 @@ arcadedb-package pom + + 1.8.0 + + com.arcadedb arcadedb-parent @@ -143,73 +147,42 @@ - org.apache.maven.plugins - maven-resources-plugin - ${maven-resources-plugin.version} + org.eclipse.jkube + kubernetes-maven-plugin + ${kubernetes-maven-plugin.version} - docker-resources - validate + default + package + + build + + + + deploy + deploy - copy-resources + push - - ${project.build.directory} - - - src/main/docker/ - false - - **/*.yml - - - - - - - - com.spotify - dockerfile-maven-plugin - ${dockerfile-maven-version} - - - default - package - - build - tag - - - latest - - - - tag-version - package - - tag - - - ${project.version} - - - - deploy - deploy - - push - - - - - - ${project.version} - - arcadedata/arcadedb - ${project.build.directory} - + + true + + + arcadedata/arcadedb + + ${project.basedir}/src/main/docker/Dockerfile + ${project.build.directory}/arcadedb-${project.version}.dir + + + latest + ${project.version} + + + + + diff --git a/package/src/main/assembly/archive.xml b/package/src/main/assembly/archive.xml index 9ddbc38ea0..a9a3453893 100644 --- a/package/src/main/assembly/archive.xml +++ b/package/src/main/assembly/archive.xml @@ -70,11 +70,11 @@ ${basedir}/../README.md - 444 + 666 ${basedir}/../LICENSE - 444 + 666