diff --git a/.circleci/config.yml b/.circleci/config.yml index 3b543c18..4a8ff58b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -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