Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunner committed Jun 7, 2023
1 parent 01d2087 commit d70c7c9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
13 changes: 10 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM gradle:8.1.1-jdk11 AS builder
FROM gradle:8.1.1-jdk11 AS internal

RUN --mount=type=cache,target=/var/cache,sharing=locked \
--mount=type=cache,target=/root/.cache \
Expand Down Expand Up @@ -36,11 +36,18 @@ RUN mkdir -p core/build/resources/test/org/mapfish/print/ \
&& chmod -R go=u /home/gradle /tmp/mapfish-print/ . \
&& chmod o+t -R core/build/resources

ENV GRADLE_USER_HOME=/home/gradle/.gradle

# For tests
FROM internal AS builder-clean

RUN gradle clean

FROM internal AS builder

# Backup cache
RUN --mount=type=cache,target=/home/gradle/.gradle \
cp -r /home/gradle/.gradle /home/gradle/.gradle-backup
RUN mv /home/gradle/.gradle-backup /home/gradle/.gradle
ENV GRADLE_USER_HOME=/home/gradle/.gradle
RUN gradle clean

COPY checkstyle_* ./
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ build: build-builder

.PHONY: build-builder
build-builder:
docker build $(GIT_HEAD_ARG) --target=builder-clean --tag=mapfish_print_builder_clean .
docker build $(GIT_HEAD_ARG) --target=builder --tag=mapfish_print_builder .

.PHONY: checks
Expand All @@ -33,7 +34,7 @@ tests: build-builder
--volume=$(PWD)/core/build/resources/:/src/core/build/resources/ \
--volume=$(PWD)/core/build/scripts/:/src/core/build/scripts/ \
--volume=$(PWD)/core/src/test/:/src/core/src/test/ \
mapfish_print_builder \
mapfish_print_builder_clean \
gradle --parallel --exclude-task=:core:spotbugsMain --exclude-task=:core:checkstyleMain --exclude-task=:core:violations \
--exclude-task=:core:spotbugsTest --exclude-task=:core:checkstyleTest \
:core:test :core:testCli
Expand Down

0 comments on commit d70c7c9

Please sign in to comment.