Skip to content

Commit

Permalink
Merge pull request #174 from mq-cloudpak/drb-ubigo-9202r2
Browse files Browse the repository at this point in the history
Use ubi8/openjdk-8 instead of docker.io/maven for JMS tests
  • Loading branch information
david-r-bell authored and GitHub Enterprise committed Jul 5, 2021
2 parents a046802 + d4ab93e commit 088b8c9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,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: docker-login
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) .

Expand Down
18 changes: 10 additions & 8 deletions test/messaging/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +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"]

0 comments on commit 088b8c9

Please sign in to comment.