Skip tests and run compile in parallel for speed
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user