Modified usage of cache for CircleCI (#1999)

This commit is contained in:
Robert McNees
2021-11-15 15:31:07 -05:00
committed by GitHub
parent ae72a5b62b
commit 0b9eed7fcf

View File

@@ -8,21 +8,25 @@ jobs:
# user: appuser
environment:
_JAVA_OPTIONS: "-Xms1024m -Xmx2048m"
CACHEVER: 1
TERM: dumb
branches:
ignore:
- gh-pages # list of branches to ignore
steps:
- checkout
# - restore_cache:
# key: sc-config-{{ .Branch }}
- type: shell
name: "Write CACHEVER to file"
command: echo "$CACHEVER" > ~/CACHEVER.txt
- restore_cache:
key: sc-config-{{ .Branch }}-{{ checksum "~/CACHEVER.txt" }}
- run:
name: "Download dependencies"
command: ./mvnw -s .settings.xml -U --fail-never dependency:go-offline || true
# - save_cache:
# key: sc-config-{{ .Branch }}
# paths:
# - ~/.m2
- save_cache:
key: sc-config-{{ .Branch }}-{{ checksum "~/CACHEVER.txt" }}
paths:
- ~/.m2
- run:
name: "Running build"
command: ./mvnw -s .settings.xml clean org.jacoco:jacoco-maven-plugin:prepare-agent install -U -P sonar,withoutDockerTests -nsu --batch-mode -Dmaven.test.redirectTestOutputToFile=true -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn