From b0008aded050f2b030b043e33eaaa4eec7df93a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Brunner?= Date: Tue, 6 Jun 2023 15:52:52 +0200 Subject: [PATCH] Fix master error Run the testCli in the tests, not in the publish --- .github/workflows/main.yaml | 2 +- Dockerfile | 5 +++++ Makefile | 5 ++++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 8e310d0741..c8bee39c8b 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -123,7 +123,7 @@ jobs: if: env.HAS_SECRETS == 'HAS_SECRETS' - run: > docker run --rm --env=GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} mapfish_print_builder - bash -c 'gradle build && gradle publish' + bash -c 'gradle publish' if: ( startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master' ) && env.HAS_SECRETS == 'HAS_SECRETS' - id: version diff --git a/Dockerfile b/Dockerfile index 979f55e4e6..1734d4934b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,6 +9,7 @@ WORKDIR /src ENV GRADLE_OPTS=-Dorg.gradle.daemon=false +# Generate the file `libnative-platform.so` RUN --mount=type=cache,target=/home/gradle/.gradle \ gradle --version @@ -41,4 +42,8 @@ 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 +# Be able to use the container with a different user +ENV GRADLE_USER_HOME=/home/gradle/ +RUN chmod -R go+rw /home/gradle/ + COPY checkstyle_* ./ diff --git a/Makefile b/Makefile index 5daf7b27b4..c49524ee56 100644 --- a/Makefile +++ b/Makefile @@ -27,14 +27,17 @@ checks: build-builder tests: build-builder mkdir --parent core/build/reports/ mkdir --parent core/build/resources/ + mkdir --parent core/build/scripts/ docker run --rm --user=$(shell id -u):$(shell id -g) \ --volume=$(PWD)/core/src/:/src/core/src/:ro \ --volume=$(PWD)/core/build/reports/:/src/core/build/reports/ \ --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/:ro \ mapfish_print_builder \ 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:test :core:testCli .PHONY: acceptance-tests-up acceptance-tests-up: build