Skip tests and run compile in parallel for speed

This commit is contained in:
James McDowell
2021-05-16 14:32:27 +10:00
committed by GitHub
parent 8429d78e01
commit f47b38f65d

View File

@@ -11,10 +11,12 @@ WORKDIR /opt/cosmic
# Any changes to the pom will affect the entire build, so it should be copied first.
COPY pom.xml ./pom.xml
# Grab all the dependencies listed in the pom early, since it prevents changes to source code from requiring a complete re-download.
RUN mvn -f ./pom.xml clean dependency:go-offline
# Skip compiling tests since we don't want all the dependecies to be downloaded.
RUN mvn -f ./pom.xml clean dependency:go-offline -Dmaven.test.skip -T 1C
# Source code changes may not change dependencies, so it can go last.
# Skip compiling tests since we don't want all the dependecies to be downloaded for plugins.
COPY src ./src
RUN mvn -f ./pom.xml clean package
RUN mvn -f ./pom.xml clean package -Dmaven.test.skip -T 1C
#
# Server creation stage