From 4d226716ec9e1d64cdd0cf49cb5f933327ed181f Mon Sep 17 00:00:00 2001 From: Thilo Schwarz Date: Sun, 6 Apr 2025 18:31:58 +0200 Subject: [PATCH] Update CI caching to use .maven-cache Introduced a consistent cache path for Maven builds by replacing .sonar/cache with .maven-cache. This change optimizes build performance by ensuring proper caching of Maven dependencies across different jobs. --- .gitlab-ci.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 726096d..e5f9159 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -32,6 +32,10 @@ on_commits: - echo "Running tests..." - cd ${GITLAB_CLONE_DIR} - mvn clean test + cache: + key: "${CI_JOB_NAME}" + paths: + - .maven-cache only: - /^feature.*$/ - merge_request @@ -45,7 +49,7 @@ sonarcloud_scan: cache: key: "${CI_JOB_NAME}" paths: - - .sonar/cache + - .maven-cache script: - sonar-scanner -Dsonar.projectKey=${SONAR_PROJECT_KEY} -Dsonar.organization=${SONAR_ORGANIZATION} -Dsonar.token=${SONAR_TOKEN} only: