From 4ce63773ba1cee107dd8fb62214a5867ed650857 Mon Sep 17 00:00:00 2001 From: Aaron Zielstorff Date: Fri, 4 Oct 2024 09:42:34 +0200 Subject: [PATCH] Updates docker image creation --- databridge.component/Dockerfile | 4 +- databridge.component/pom.xml | 72 ++++++++------------- pom.xml | 110 +++++++++++++++++++++++++++++++- 3 files changed, 136 insertions(+), 50 deletions(-) diff --git a/databridge.component/Dockerfile b/databridge.component/Dockerfile index d62547f8..4a73932d 100644 --- a/databridge.component/Dockerfile +++ b/databridge.component/Dockerfile @@ -4,9 +4,9 @@ FROM openjdk:11-slim-bullseye RUN apt update && apt install -y wget && apt clean # Copy built jar to image using the jar name specified in the pom.xml (JAR_FILE) -ARG JAR_FILE +ARG JAR_FILE=target/*.jar -COPY target/${JAR_FILE} /usr/share/databridgeExecutable.jar +COPY ${JAR_FILE} /usr/share/databridgeExecutable.jar COPY target/lib /usr/share/lib # Expose this port for health check diff --git a/databridge.component/pom.xml b/databridge.component/pom.xml index 00f83492..f79ba0ea 100644 --- a/databridge.component/pom.xml +++ b/databridge.component/pom.xml @@ -18,6 +18,7 @@ UTF-8 org.eclipse.digitaltwin.basyx.databridge.component.DataBridgeExecutable + databridge @@ -58,13 +59,6 @@ **/logback.xml - - - - test-jar - - - @@ -87,106 +81,106 @@ org.eclipse.digitaltwin.basyx databridge.camel-paho - 0.0.1-SNAPSHOT + ${revision} org.eclipse.digitaltwin.basyx databridge.camel-aas - 0.0.1-SNAPSHOT + ${revision} org.eclipse.digitaltwin.basyx databridge.camel-jsonata - 0.0.1-SNAPSHOT + ${revision} org.eclipse.digitaltwin.basyx databridge.camel-activemq - 0.0.1-SNAPSHOT + ${revision} org.eclipse.digitaltwin.basyx databridge.camel-hono - 0.0.1-SNAPSHOT + ${revision} org.eclipse.digitaltwin.basyx databridge.camel-httppolling - 0.0.1-SNAPSHOT + ${revision} org.eclipse.digitaltwin.basyx databridge.camel-kafka - 0.0.1-SNAPSHOT + ${revision} org.eclipse.digitaltwin.basyx databridge.camel-opcua - 0.0.1-SNAPSHOT + ${revision} org.eclipse.digitaltwin.basyx databridge.camel-sql - 0.0.1-SNAPSHOT + ${revision} org.eclipse.digitaltwin.basyx databridge.camel-timer - 0.0.1-SNAPSHOT + ${revision} org.eclipse.digitaltwin.basyx databridge.camel-jsonjackson - 0.0.1-SNAPSHOT + ${revision} org.eclipse.digitaltwin.basyx databridge.camel-plc4x - 0.0.1-SNAPSHOT + ${revision} org.eclipse.digitaltwin.basyx databridge.examples.plc4x-jsonata-aas - 0.0.1-SNAPSHOT + ${revision} test org.eclipse.digitaltwin.basyx databridge.examples.aas-jsonata-mqtt - 0.0.1-SNAPSHOT + ${revision} test org.eclipse.digitaltwin.basyx databridge.examples.sql-jsonata-aas - 0.0.1-SNAPSHOT + ${revision} test org.eclipse.digitaltwin.basyx databridge.examples.aas-jsonata-http - 0.0.1-SNAPSHOT + ${revision} org.eclipse.digitaltwin.basyx databridge.examples.httpserver - 0.0.1-SNAPSHOT + ${revision} @@ -294,7 +288,7 @@ - docker + docker-push @@ -340,28 +334,12 @@ io.fabric8 docker-maven-plugin - 0.43.2 - - - - ${BASYX_IMAGE_NAME}:${BASYX_IMAGE_TAG} - - ${project.basedir} - - ${project.build.finalName}.jar - - - - - true - - docker:build - package - - build - + build-docker + + + push-docker @@ -376,8 +354,8 @@ true ${project.basedir}/src/test/resources/.env - ${BASYX_IMAGE_TAG} - ${BASYX_IMAGE_NAME} + ${docker.image.tag} + ${docker.namespace}/${docker.image.name} ${project.basedir}/src/test/resources/mqtt diff --git a/pom.xml b/pom.xml index 3499f913..8e250375 100644 --- a/pom.xml +++ b/pom.xml @@ -33,6 +33,7 @@ https://opensource.org/licenses/MIT + Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V. @@ -41,11 +42,17 @@ frank.schnicke@iese.fraunhofer.de + 11 UTF-8 UTF-8 - 0.0.1-SNAPSHOT + 1.0.0-SNAPSHOT + + eclipsebasyx + NOT_DEFINED_IN_MODULE + ${revision} + linux/amd64, linux/arm64/v8 3.21.0 @@ -76,6 +83,70 @@ + + + + io.fabric8 + docker-maven-plugin + 0.45.1 + + + + + ${docker.namespace}/${docker.image.name}:${docker.image.tag} + docker.io + + ${project.basedir} + + + + ${project.version} + + ${maven.build.timestamp} + + true + + + ${docker.target.platforms} + + + + + + true + + + + build-docker + package + + build + + + + push-docker + deploy + + build + push + + + + + + + + ${docker.target.platforms} + + + + + + + + + + @@ -89,4 +160,41 @@ + + + + docker-push + + + + io.fabric8 + docker-maven-plugin + + + push-docker + package + + build + push + + + + + + org.eclipse.dash + license-tool-plugin + 1.1.1-SNAPSHOT + + + license-check + + license-check + + + + + + + + \ No newline at end of file