Skip to content

Commit

Permalink
SCANMAVEN-255 Onboard develocity
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardo-pilastri-sonarsource committed Dec 24, 2024
1 parent 3c6bd6e commit c806ac1
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ env:
ARTIFACTORY_DEPLOY_REPO: sonarsource-public-qa

ARTIFACTORY_PROMOTE_ACCESS_TOKEN: VAULT[development/artifactory/token/${CIRRUS_REPO_OWNER}-${CIRRUS_REPO_NAME}-promoter access_token]

DEVELOCITY_TOKEN: VAULT[development/kv/data/develocity data.token]
DEVELOCITY_ACCESS_KEY: develocity.sonar.build=${DEVELOCITY_TOKEN}
### Project variables
DEPLOY_PULL_REQUEST: true

Expand All @@ -28,6 +29,9 @@ container_definition: &CONTAINER_DEFINITION
only_sonarsource_qa: &ONLY_SONARSOURCE_QA
only_if: $CIRRUS_USER_COLLABORATOR == 'true' && ($CIRRUS_PR != "" || $CIRRUS_BRANCH == "master" || $CIRRUS_BRANCH =~ "branch-.*" || $CIRRUS_BRANCH =~ "dogfood-on-.*")

log_develocity_url_script: &log_develocity_url_script |
echo "Develocity URL: https://develocity.sonar.build/scans?search.publicHostnames=cirrus-ci-task-${CIRRUS_TASK_ID}"

#
# TASKS
#
Expand All @@ -44,6 +48,7 @@ build_task:
maven_cache:
folder: ${CIRRUS_WORKING_DIR}/.m2/repository
script:
- *log_develocity_url_script
- source cirrus-env BUILD
- mvn -f property-dump-plugin/pom.xml -B install
- regular_mvn_build_deploy_analyze
Expand Down Expand Up @@ -116,6 +121,7 @@ qa_task:
maven_cache:
folder: ${CIRRUS_WORKING_DIR}/.m2/repository
qa_script:
- *log_develocity_url_script
- ./cirrus/cirrus-qa.sh
cleanup_before_cache_script:
- cleanup_maven_repository
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,6 @@ Icon?
Thumbs.db
# Folder config file
Desktop.ini

#Develocity
.mvn/.develocity/
13 changes: 13 additions & 0 deletions .mvn/develocity.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<develocity>
<server>
<url>https://develocity.sonar.build</url>
</server>
<buildCache>
<local>
<storeEnabled>#{env['CI'] == null}</storeEnabled>
</local>
<remote>
<storeEnabled>#{env['CI'] != null}</storeEnabled>
</remote>
</buildCache>
</develocity>
7 changes: 7 additions & 0 deletions .mvn/extensions.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<extensions>
<extension>
<groupId>com.gradle</groupId>
<artifactId>develocity-maven-extension</artifactId>
<version>1.22.2</version>
</extension>
</extensions>

0 comments on commit c806ac1

Please sign in to comment.