Skip to content

Commit

Permalink
1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Gematik-Entwicklung committed Dec 5, 2024
1 parent 93c9c80 commit 99ad365
Show file tree
Hide file tree
Showing 16 changed files with 215 additions and 153 deletions.
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*
!pom.xml
!src
!downloadDeps.sh
43 changes: 21 additions & 22 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2023 gematik - Gesellschaft für Telematikanwendungen der Gesundheitskarte mbH
# Copyright (c) 2024 gematik - Gesellschaft für Telematikanwendungen der Gesundheitskarte mbH
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -17,36 +17,35 @@
# used java 21 image due to different m2 respository location
FROM maven:3-eclipse-temurin-21-alpine

# The STOPSIGNAL instruction sets the system call signal that will be sent to the container to exit
# SIGTERM = 15 - https://de.wikipedia.org/wiki/Signal_(Unix)
STOPSIGNAL SIGTERM

# Git Args
ARG COMMIT_HASH
ARG VERSION

LABEL de.gematik.vendor="gematik GmbH"
LABEL maintainer="[email protected]"
LABEL de.gematik.app="ePA KOB Testsuite for PS"
LABEL de.gematik.git-repo-name="https://gitlab.prod.ccs.gematik.solutions/git/Testtools/ePA/kob-testsuite"
LABEL de.gematik.commit-sha=$COMMIT_HASH
LABEL de.gematik.version=$VERSION
###########################
# Labels
###########################
LABEL de.gematik.vendor="gematik GmbH" \
maintainer="[email protected]" \
de.gematik.app="ePA KOB Testsuite for PS" \
de.gematik.git-repo-name="https://github.com/gematik/kob-Testsuite/" \
de.gematik.commit-sha=$COMMIT_HASH \
de.gematik.version=$VERSION

# Default USERID and GROUPID
ARG USERID=10000
ARG GROUPID=10000

RUN mkdir -p /.m2/repository
RUN chown -R $USERID:$GROUPID /.m2/repository
COPY . /app
COPY downloadDeps.sh /app

# Run as User (not root)
USER $USERID:$GROUPID
RUN mkdir -p /app/report

# Default Working directory
WORKDIR /app

# Defining default Healthcheck e.g. when run without docker-compose or without healthcheck definition in it
HEALTHCHECK --interval=15s --timeout=10s --start-period=15s \
CMD ["wget", "--quiet", "--tries=1", "--output-document", "-", "http://localhost:8080/actuator/health"]

# Copy the resource to the destination folder and assign permissions
COPY --chown=$USERID:$GROUPID src /app/src
COPY --chown=$USERID:$GROUPID pom.xml /app/pom.xml
RUN ./downloadDeps.sh
RUN rm -f ./downloadDeps.sh

# Command to be executed.
ENTRYPOINT ["mvn", "clean", "verify"]
ENTRYPOINT ["bash", "-c", "/app/run.sh"]
14 changes: 13 additions & 1 deletion README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,19 @@ Für die Beantragung des KOB Zertifikates bei der gematik benötigen Sie als Pr

Die Testergebnisse selbst sind unter `target/site/serenity/index.html` zu finden und können somit im Browser verifiziert werden.
Der Testreport wird automatisch nach der Ausführung im `target/kob-testsuite.*-test-report.zip` abgelegt, wenn die Ausführung über den Quit Button in der WorkflowUI beendet wird.
Auch bei der Ausführung als Docker Container wird die Datei direkt in diesem Verzeichnis des Repositories abgelegt.

=== Testreport aus Docker Container

Um diese Datei aus dem Docker Container in das lokale System zu kopieren, kann folgender Befehl genutzt werden:

[source,bash]
----
docker cp kob-testsuite:/app/report/kob-testsuite-test-report.zip .
----

Eine weitere Möglichkeit ist, die Report ZIP Datei über die Anwendung DockerDesktop herunterzuladen.

image::/doc/img/docker_desktop_volumes.png[Download Test Report ZIP über Docker Desktop]

=== Upload bei TITUS

Expand Down
9 changes: 9 additions & 0 deletions ReleaseNotes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Release Notes KOB Testsuite

## Release 1.0.1

* Added corrected NO-PROXY flag for AS-Selector
* Added preparation test step to check if health record systems are reachable (now visible in Workflow UI)
* Rework docker container handling (issues with access rights)
* Remove access from docker container to host system. Thus, the report has to be copied from container to host system manually (please see Readme)
* Test report will be moved to extra docker volume `kob-testsuite-report` after finishing the testsuite
* Copy report zip file from container to host system (please see Readme)

## Release 1.0.0

* Initial version to get KOB certification
Expand Down
14 changes: 9 additions & 5 deletions dc-testsuite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: dc-testsuite-kob
services:
kob-testsuite:
image: gematik1/kob-testsuite:1.0.0
image: gematik1/kob-testsuite:1.0.1
container_name: kob-testsuite
environment:
- MAVEN_OPTS=-Dcucumber.filter.tags=${TESTSUITE_TESTS}
Expand All @@ -14,10 +14,14 @@ services:
- "9011:9011"
- "443:443"
volumes:
- ./:/app
- kob-testsuite-maven:/.m2
# has to be 'copied' AFTER the volume is mounted
- ./settings.xml:/.m2/settings.xml
- ./tiger.yaml:/app/tiger.yaml:ro
- ./kob.yaml:/app/kob.yaml:ro
- ./settings.xml:/.m2/settings.xml:ro
- ./run.sh:/app/run.sh:ro
- kob-testsuite-maven:/.m2/repository:rw
- kob-testsuite-report:/app/report:rw
volumes:
kob-testsuite-maven:
name: kob-testsuite-maven
kob-testsuite-report:
name: kob-testsuite-report
Binary file added doc/img/docker_desktop_volumes.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions downloadDeps.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash

mvn clean verify -DskipTests
3 changes: 2 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

<groupId>de.gematik</groupId>
<artifactId>kob-testsuite</artifactId>
<version>1.0.0</version>
<version>1.0.1</version>
<packaging>jar</packaging>
<description>KOB Testsuite fuer PS Hersteller</description>

Expand Down Expand Up @@ -87,6 +87,7 @@
</dependencies>

<build>
<finalName>${project.artifactId}</finalName>
<pluginManagement>
<plugins>
<plugin>
Expand Down
5 changes: 5 additions & 0 deletions run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash

rm -rf /app/report/*
mvn clean verify || true
mv -v /app/target/*report.zip /app/report/
Loading

0 comments on commit 99ad365

Please sign in to comment.