Skip to content

Commit

Permalink
AWT in-container test
Browse files Browse the repository at this point in the history
  • Loading branch information
Karm committed Feb 28, 2023
1 parent 08ea3be commit 03bd4de
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 2 deletions.
41 changes: 39 additions & 2 deletions integration-tests/awt/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
<groupId>io.quarkus</groupId>
<artifactId>quarkus-resteasy-multipart</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-container-image-docker</artifactId>
</dependency>

<!-- test dependencies -->
<dependency>
Expand All @@ -45,6 +49,8 @@
<scope>test</scope>
</dependency>



<!-- Minimal test dependencies to *-deployment artifacts for consistent build order -->
<dependency>
<groupId>io.quarkus</groupId>
Expand All @@ -59,7 +65,6 @@
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-resteasy-multipart-deployment</artifactId>
Expand Down Expand Up @@ -99,7 +104,19 @@
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-container-image-docker-deployment</artifactId>
<version>${project.version}</version>
<type>pom</type>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>

<build>
Expand Down Expand Up @@ -128,6 +145,26 @@
<reuseForks>false</reuseForks>
</configuration>
</plugin>
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
<configuration>
<systemPropertyVariables>
<native.image.path>${project.build.directory}/${project.build.finalName}-runner</native.image.path>
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
<maven.home>${maven.home}</maven.home>
<quarkus.http.host>localhost</quarkus.http.host>
<quarkus.http.port>8081</quarkus.http.port>
</systemPropertyVariables>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

Expand Down
15 changes: 15 additions & 0 deletions integration-tests/awt/src/main/docker/Dockerfile.native
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.7
# Dependencies for AWT
RUN microdnf install freetype fontconfig \
&& microdnf clean all
WORKDIR /work/
RUN chown 1001 /work \
&& chmod "g+rwX" /work \
&& chown 1001:root /work
COPY --chown=1001:root target/*-runner /work/application
# Permissions fix for Windows
RUN chmod "ugo+x" /work/application
EXPOSE 8081
USER 1001

CMD ["./application", "-Dquarkus.http.host=0.0.0.0"]

0 comments on commit 03bd4de

Please sign in to comment.