Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Maven
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SmartDataLab
public
CI-CD components
Maven
Commits
ba82d4cf
Commit
ba82d4cf
authored
2 years ago
by
Pierre Smeyers
Browse files
Options
Downloads
Patches
Plain Diff
feat: manage Sonar task cache in GitLab
parent
841cedf8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
templates/gitlab-ci-maven.yml
+8
-3
8 additions, 3 deletions
templates/gitlab-ci-maven.yml
with
8 additions
and
3 deletions
templates/gitlab-ci-maven.yml
+
8
−
3
View file @
ba82d4cf
...
...
@@ -495,9 +495,14 @@ mvn-sonar:
stage
:
test
extends
:
.mvn-base
variables
:
# Tells git to fetch all the branches of the project, required by the analysis task
# see: https://docs.sonarqube.org/8.5/analysis/gitlab-cicd/#header-2
GIT_DEPTH
:
0
# see: https://docs.sonarqube.org/latest/analysis/gitlab-integration/#header-4
SONAR_USER_HOME
:
"
${CI_PROJECT_DIR}/${MAVEN_PROJECT_DIR}/.sonar"
# Defines the location of the analysis task cache
GIT_DEPTH
:
0
# Tells git to fetch all the branches of the project, required by the analysis task
cache
:
key
:
"
$CI_COMMIT_REF_SLUG-maven-sonar"
paths
:
-
"
${MAVEN_PROJECT_DIR}/${MAVEN_CFG_DIR}/repository"
-
"
${MAVEN_PROJECT_DIR}/.sonar/cache"
script
:
-
sonar_autodetect_mr
-
|
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment