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.
This commit is contained in:
+5
-1
@@ -32,6 +32,10 @@ on_commits:
|
|||||||
- echo "Running tests..."
|
- echo "Running tests..."
|
||||||
- cd ${GITLAB_CLONE_DIR}
|
- cd ${GITLAB_CLONE_DIR}
|
||||||
- mvn clean test
|
- mvn clean test
|
||||||
|
cache:
|
||||||
|
key: "${CI_JOB_NAME}"
|
||||||
|
paths:
|
||||||
|
- .maven-cache
|
||||||
only:
|
only:
|
||||||
- /^feature.*$/
|
- /^feature.*$/
|
||||||
- merge_request
|
- merge_request
|
||||||
@@ -45,7 +49,7 @@ sonarcloud_scan:
|
|||||||
cache:
|
cache:
|
||||||
key: "${CI_JOB_NAME}"
|
key: "${CI_JOB_NAME}"
|
||||||
paths:
|
paths:
|
||||||
- .sonar/cache
|
- .maven-cache
|
||||||
script:
|
script:
|
||||||
- sonar-scanner -Dsonar.projectKey=${SONAR_PROJECT_KEY} -Dsonar.organization=${SONAR_ORGANIZATION} -Dsonar.token=${SONAR_TOKEN}
|
- sonar-scanner -Dsonar.projectKey=${SONAR_PROJECT_KEY} -Dsonar.organization=${SONAR_ORGANIZATION} -Dsonar.token=${SONAR_TOKEN}
|
||||||
only:
|
only:
|
||||||
|
|||||||
Reference in New Issue
Block a user