From 4a5b220550d5ebceed2045f80ff72c733b0d0024 Mon Sep 17 00:00:00 2001 From: Enrique Gonzalez Martinez Date: Thu, 11 Jan 2024 11:06:10 +0100 Subject: [PATCH 1/2] [incubator-kie-issues-813] Create multiple quarkus builds for data audit container images. --- .../data-audit-quarkus-jpa-service/pom.xml | 27 ++++++++++++++++--- .../src/main/resources/application.properties | 21 +++++++++++---- 2 files changed, 40 insertions(+), 8 deletions(-) diff --git a/data-audit/kogito-addons-data-audit-jpa/data-audit-quarkus-jpa-service/pom.xml b/data-audit/kogito-addons-data-audit-jpa/data-audit-quarkus-jpa-service/pom.xml index 0f7f031ef4..4a4e074f94 100644 --- a/data-audit/kogito-addons-data-audit-jpa/data-audit-quarkus-jpa-service/pom.xml +++ b/data-audit/kogito-addons-data-audit-jpa/data-audit-quarkus-jpa-service/pom.xml @@ -28,6 +28,10 @@ kogito-addons-data-audit-jpa-quarkus + + io.quarkus + quarkus-flyway + io.quarkus quarkus-container-image-jib @@ -39,14 +43,31 @@ io.quarkus quarkus-maven-plugin - - true - + true + h2 + + build + + + + h2 + h2-quarkus-app + + + + + postgresql build + + + postgresql + postgresql-quarkus-app + + diff --git a/data-audit/kogito-addons-data-audit-jpa/data-audit-quarkus-jpa-service/src/main/resources/application.properties b/data-audit/kogito-addons-data-audit-jpa/data-audit-quarkus-jpa-service/src/main/resources/application.properties index be277ecd5c..7b758d2580 100644 --- a/data-audit/kogito-addons-data-audit-jpa/data-audit-quarkus-jpa-service/src/main/resources/application.properties +++ b/data-audit/kogito-addons-data-audit-jpa/data-audit-quarkus-jpa-service/src/main/resources/application.properties @@ -1,13 +1,24 @@ -#default values +# build multiple images + +%h2.quarkus.datasource.db-kind=h2 +%h2.quarkus.datasource.jdbc.url=${QUARKUS_DATASOURCE_JDBC_URL:jdbc:h2:mem:data-audit} +%h2.quarkus.container-image.name=data-audit-jpa-h2-service +%h2.quarkus.container-image.additional-tags=h2 +%h2.quarkus.flyway.locations=classpath:/db/data-audit/h2/ + + +%postgresql.quarkus.datasource.db-kind=postgresql +%postgresql.quarkus.datasource.jdbc.url=${QUARKUS_DATASOURCE_JDBC_URL:jdbc:postgresql://localhost:5432/kogito} +%postgresql.quarkus.container-image.name=data-audit-jpa-postgresql-service +%postgresql.quarkus.container-image.additional-tags=postgresql +%postgresql.quarkus.flyway.locations=classpath:/db/data-audit/h2/ + -quarkus.datasource.db-kind=${QUARKUS_DATASOURCE_DB:h2} quarkus.datasource.username=${QUARKUS_DATASOURCE_USER:kogito-user} quarkus.datasource.password=${QUARKUS_DATASOURCE_PASS:kogito-pass} -quarkus.datasource.jdbc.url=${QUARKUS_DATASOURCE_JDBC_URL:jdbc:h2:mem:data-audit} -quarkus.hibernate-orm.database.generation=update +quarkus.flyway.migrate-at-start=${QUARKUS_FLYWAY_MIGRATE_AT_START:true} quarkus.container-image.build=${quarkus.build.image:true} quarkus.container-image.group=org.kie.kogito quarkus.jib.jvm-arguments=-Dquarkus.http.port=8080 -quarkus.container-image.name=data-audit-jpa-service \ No newline at end of file From 0c974c94195e7c2b506dec202827c67f6ea6a0ee Mon Sep 17 00:00:00 2001 From: Enrique Gonzalez Martinez Date: Mon, 15 Jan 2024 08:47:39 +0100 Subject: [PATCH 2/2] fix classpath for pgsql --- .../src/main/resources/application.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data-audit/kogito-addons-data-audit-jpa/data-audit-quarkus-jpa-service/src/main/resources/application.properties b/data-audit/kogito-addons-data-audit-jpa/data-audit-quarkus-jpa-service/src/main/resources/application.properties index 7b758d2580..fac5a15376 100644 --- a/data-audit/kogito-addons-data-audit-jpa/data-audit-quarkus-jpa-service/src/main/resources/application.properties +++ b/data-audit/kogito-addons-data-audit-jpa/data-audit-quarkus-jpa-service/src/main/resources/application.properties @@ -11,7 +11,7 @@ %postgresql.quarkus.datasource.jdbc.url=${QUARKUS_DATASOURCE_JDBC_URL:jdbc:postgresql://localhost:5432/kogito} %postgresql.quarkus.container-image.name=data-audit-jpa-postgresql-service %postgresql.quarkus.container-image.additional-tags=postgresql -%postgresql.quarkus.flyway.locations=classpath:/db/data-audit/h2/ +%postgresql.quarkus.flyway.locations=classpath:/db/data-audit/postgresql// quarkus.datasource.username=${QUARKUS_DATASOURCE_USER:kogito-user}