From 20ce8fe418fd7eaf4e2b77c37fda3adcbf065968 Mon Sep 17 00:00:00 2001 From: Daniel Gerhardt <code@dgerhardt.net> Date: Wed, 11 Jul 2018 15:10:09 +0200 Subject: [PATCH] Improve CI cache configuration --- .gitlab-ci.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c7b9c9e3a..71d2435df 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,7 +7,7 @@ stages: - post-build - deploy -cache: +.maven_cache: &maven_cache paths: - .m2/ @@ -15,6 +15,7 @@ checkstyle: stage: build tags: - maven + cache: *maven_cache script: - mvn checkstyle:checkstyle @@ -25,6 +26,7 @@ compile: artifacts: paths: - $OUTPUT_DIR + cache: *maven_cache script: - mvn test-compile @@ -37,6 +39,7 @@ unit_test: artifacts: paths: - $OUTPUT_DIR + cache: *maven_cache script: - mvn surefire:test @@ -50,6 +53,7 @@ package: name: package paths: - $WAR_FILE + cache: *maven_cache script: - mvn war:war @@ -112,6 +116,7 @@ sonarqube: dependencies: - compile - unit_test + cache: *maven_cache allow_failure: true script: - mvn sonar:sonar -- GitLab