diff --git a/Makefile b/Makefile index 453b68c..25f7abe 100644 --- a/Makefile +++ b/Makefile @@ -258,7 +258,7 @@ test-advancedserver: test/docker/vendor cd test/docker && TEST_IMAGE=$(MQ_IMAGE_ADVANCEDSERVER):$(MQ_TAG) EXPECTED_LICENSE=Production go test -parallel $(NUM_CPU) -timeout $(TEST_TIMEOUT_DOCKER) $(TEST_OPTS_DOCKER) .PHONY: build-devjmstest -build-devjmstest: +build-devjmstest: registry-login $(info $(SPACER)$(shell printf $(TITLE)"Build JMS tests for developer config"$(END))) cd test/messaging && docker build --tag $(DEV_JMS_IMAGE) . diff --git a/test/messaging/Dockerfile b/test/messaging/Dockerfile index 92d78c1..1b29b0e 100644 --- a/test/messaging/Dockerfile +++ b/test/messaging/Dockerfile @@ -15,23 +15,24 @@ ############################################################################### # Application build environment (Maven) ############################################################################### -FROM docker.io/maven:3-ibmjava as builder -COPY pom.xml /usr/src/mymaven/ -WORKDIR /usr/src/mymaven +FROM registry.redhat.io/ubi8/openjdk-8 as builder +COPY pom.xml . +#WORKDIR /usr/src/mymaven # Download dependencies separately, so Docker caches them RUN mvn dependency:go-offline install # Copy source -COPY src /usr/src/mymaven/src +COPY src . # Run the main build RUN mvn --offline install # Print a list of all the files (useful for debugging) -RUN find /usr/src/mymaven +RUN find . ############################################################################### # Application runtime (JRE only, no build environment) ############################################################################### -FROM docker.io/ibmjava:8-jre -COPY --from=builder /usr/src/mymaven/target/*.jar /opt/app/ -COPY --from=builder /usr/src/mymaven/target/lib/*.jar /opt/app/ +# OpenJDK is not technically supported with the MQ client, but is good enough for these tests +FROM registry.redhat.io/ubi8/openjdk-8-runtime +COPY --from=builder /home/jboss/target/*.jar /opt/app/ +COPY --from=builder /home/jboss/target/lib/*.jar /opt/app/ USER 1001 ENTRYPOINT ["java", "-classpath", "/opt/app/*", "org.junit.platform.console.ConsoleLauncher", "-p", "com.ibm.mqcontainer.test", "--details", "verbose"]