Skip to content

Commit

Permalink
Adding Maven cache to CircleCI config
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosroman committed Dec 28, 2023
1 parent 5b7b838 commit 0ee28f8
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,37 @@ version: 2
lint_steps: &lint_steps
steps:
- checkout
- restore_cache:
name: Restore Maven cache
keys:
# when pom.xml file changes, use increasingly general patterns to restore cache
# Linting has own cache as deps not downloaded during test phases. If doesn't exist will
# fall back on any available cache.
- &maven-cache maven-cache-{{ .Branch }}-{{ checksum "pom.xml" }}-lint
- maven-cache-{{ .Branch }}-
- maven-cache-
- run: ./mvnw verify -B -Dhttps.protocols=TLSv1.2 -DskipTests
- save_cache:
key: *maven-cache
paths:
- ~/.m2
build_steps: &build_steps
steps:
- checkout
- restore_cache:
name: Restore Maven cache
keys:
# when pom.xml file changes, use increasingly general patterns to restore cache
- &maven-cache maven-cache-{{ .Branch }}-{{ checksum "pom.xml" }}
- maven-cache-{{ .Branch }}-
- maven-cache-
- setup_remote_docker
- run: ./mvnw test -B -Dhttps.protocols=TLSv1.2 -Dcheckstyle.skip=true -Dtests.log_level=info -Djdk.attach.allowAttachSelf=true
- save_cache:
when: always
key: *maven-cache
paths:
- ~/.m2
- run:
when: on_fail
command: for log in target/surefire-reports/*.txt; do echo "$log ========================" ; cat $log ; done
Expand Down

0 comments on commit 0ee28f8

Please sign in to comment.