From 0d40d379f69e9b9c1ff55734e075e3682b65bf03 Mon Sep 17 00:00:00 2001 From: Kilian Schuettler Date: Wed, 4 Oct 2023 15:32:55 +0200 Subject: [PATCH] DM-285: adjust reports to new component log --- publish-custom-docker-img.sh | 27 +++++++++++++++++++ .../pom.xml | 3 ++- .../StatusReportGenerationServiceTest.java | 2 +- 3 files changed, 30 insertions(+), 2 deletions(-) create mode 100755 publish-custom-docker-img.sh diff --git a/publish-custom-docker-img.sh b/publish-custom-docker-img.sh new file mode 100755 index 0000000..4b70fde --- /dev/null +++ b/publish-custom-docker-img.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +# This script compiles the project, builds a docker image with the tag - and pushes it to our nexus. + +# Set the Nexus repository URL +NEXUS_REPO="nexus.knecon.com:5001" +# Set the image name +IMAGE_NAME="red/redaction-report-service-server-v1" +# path to image repo +IMAGE_REPO="redaction-report-service-image-v1" + +echo "Running build" +mvn clean install -Pquickbuild + +# Get the current Git branch +GIT_BRANCH=$(git symbolic-ref --short HEAD) +# Get the first 5 characters of the commit hash +GIT_COMMIT_HASH=$(git rev-parse --short=5 HEAD) +# Create the image tag by combining branch and commit hash +IMAGE_TAG="${GIT_BRANCH}-${GIT_COMMIT_HASH}" +IMAGE_NAME="$NEXUS_REPO/$IMAGE_NAME:$IMAGE_TAG" + +echo "Building docker image: {$IMAGE_NAME}" +# Build the Docker image with the specified name and tag and push to nexus +mvn -f $IMAGE_REPO docker:build docker:push -Ddocker.image.version=$IMAGE_TAG + +echo "Docker image '$IMAGE_NAME' has been built and pushed to Nexus." diff --git a/redaction-report-service-v1/redaction-report-service-server-v1/pom.xml b/redaction-report-service-v1/redaction-report-service-server-v1/pom.xml index b6c2571..1c083cb 100644 --- a/redaction-report-service-v1/redaction-report-service-server-v1/pom.xml +++ b/redaction-report-service-v1/redaction-report-service-server-v1/pom.xml @@ -83,9 +83,10 @@ + com.iqser.red.service - persistence-service-external-api-v2 + persistence-service-external-api-impl-v2 ${persistence-service.version} diff --git a/redaction-report-service-v1/redaction-report-service-server-v1/src/test/java/com/iqser/red/service/redaction/report/v1/server/service/StatusReportGenerationServiceTest.java b/redaction-report-service-v1/redaction-report-service-server-v1/src/test/java/com/iqser/red/service/redaction/report/v1/server/service/StatusReportGenerationServiceTest.java index 599f9b1..8c56541 100644 --- a/redaction-report-service-v1/redaction-report-service-server-v1/src/test/java/com/iqser/red/service/redaction/report/v1/server/service/StatusReportGenerationServiceTest.java +++ b/redaction-report-service-v1/redaction-report-service-server-v1/src/test/java/com/iqser/red/service/redaction/report/v1/server/service/StatusReportGenerationServiceTest.java @@ -44,7 +44,7 @@ public class StatusReportGenerationServiceTest { String dossierId = "dossierId"; - Dossier dossier = Dossier.builder().dossierName("dossierName").id(dossierId).build(); + Dossier dossier = Dossier.builder().name("dossierName").id(dossierId).build(); when(dossierClient.getDossierById(dossierId, true, false)).thenReturn(dossier); FileModel fileStatus1 = FileModel.builder()