Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUILD-7003 Set up Develocity #515

Draft
wants to merge 13 commits into
base: master
Choose a base branch
from
20 changes: 10 additions & 10 deletions .cirrus.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
env:
CIRRUS_VAULT_URL: https://vault.sonar.build:8200
CIRRUS_VAULT_AUTH_PATH: jwt-cirrusci
CIRRUS_VAULT_ROLE: cirrusci-${CIRRUS_REPO_OWNER}-${CIRRUS_REPO_NAME}

ARTIFACTORY_URL: VAULT[development/kv/data/repox data.url]

ARTIFACTORY_PRIVATE_USERNAME: vault-${CIRRUS_REPO_OWNER}-${CIRRUS_REPO_NAME}-private-reader
Expand All @@ -18,6 +14,9 @@
ORG_GRADLE_PROJECT_signingPassword: VAULT[development/kv/data/sign data.passphrase]
ORG_GRADLE_PROJECT_signingKeyId: 0x7DCD4258

DEVELOCITY_TOKEN: VAULT[development/kv/data/develocity data.token]
DEVELOCITY_ACCESS_KEY: develocity.sonar.build=${DEVELOCITY_TOKEN}

# Use bash (instead of sh on linux or cmd.exe on windows)
CIRRUS_SHELL: bash

Expand Down Expand Up @@ -81,7 +80,7 @@
git submodule update --init --depth 1 "${GIT_SUB_MODULE}"
fi
- source cirrus-env QA
- ./gradlew "${GRADLE_TASK}" "-P${ITS_PROJECT}"
- ./gradlew "${GRADLE_TASK}" "-P${ITS_PROJECT}" -Dscan.tag.CI -Dscan.tag.${ITS_PROJECT} -Dscan.tag.SQ_${SQ_VERSION}
"-Dsonar.runtimeVersion=${SQ_VERSION}"
"-DbuildNumber=$BUILD_NUMBER"
--info --console plain --no-daemon --build-cache
Expand All @@ -106,7 +105,7 @@
DEPLOY_PULL_REQUEST: true
build_script:
- source cirrus-env BUILD-PRIVATE
- regular_gradle_build_deploy_analyze -x test -x sonar
- regular_gradle_build_deploy_analyze -x test -x sonar -Dscan.tag.CI -Dscan.tag.build
on_failure:
error_log_artifacts:
path: "hs_err_pid*.log"
Expand All @@ -125,7 +124,8 @@
DEPLOY_PULL_REQUEST: true
build_script:
- source cirrus-env BUILD-PRIVATE
- regular_gradle_build_deploy_analyze -x artifactoryPublish
- ./gradlew build -Dscan.tag.CI -Dscan.tag.test
- regular_gradle_build_deploy_analyze -x build -x artifactoryPublish -Dscan.tag.CI -Dscan.tag.analyze
on_failure:
error_log_artifacts:
path: "hs_err_pid*.log"
Expand All @@ -146,7 +146,7 @@
folder: ${CIRRUS_WORKING_DIR}/.m2/repository
whitesource_script:
- source cirrus-env QA
- ./gradlew clean assemble
- ./gradlew clean assemble -Dscan.tag.WS_BUILD
- source ./export_ws_variables.sh
- source ws_scan.sh
allow_failures: "true"
Expand Down Expand Up @@ -202,7 +202,7 @@
git submodule update --init --depth 1 "${GIT_SUB_MODULE}"
fi
- source cirrus-env QA
- ./gradlew :its:ruling:test --tests "org.sonarsource.slang.SlangRulingTest.test_kotlin_compiler" -Pruling
- ./gradlew :its:ruling:test --tests "org.sonarsource.slang.SlangRulingTest.test_kotlin_compiler" -Pruling -Dscan.tag.CI -Dscan.tag.ruling -Dscan.tag.kotlin-compiler
"-Dsonar.runtimeVersion=${SQ_VERSION}"
"-DbuildNumber=$BUILD_NUMBER"
--info --console plain --no-daemon --build-cache
Expand All @@ -213,7 +213,7 @@
<<: *WINDOWS_16_CPU_32G
<<: *SETUP_GRADLE_CACHE
build_script:
- ./gradlew build --info --console plain --no-daemon --build-cache
- ./gradlew build --info --console plain --no-daemon --build-cache -Dscan.tag.CI -Dscan.tag.build-win
on_failure:
error_log_artifacts:
path: "hs_err_pid*.log"
Expand All @@ -221,7 +221,7 @@
path: "*.hprof"
<<: *CLEANUP_GRADLE_CACHE_SCRIPT

promote_task:

Check warning on line 224 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L224

task "promote" depends on task "ws_scan", but their only_if conditions are different

Check warning on line 224 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L224

task "promote" depends on task "ws_scan", but their only_if conditions are different
depends_on:
- build
- build_test_analyze
Expand Down
14 changes: 14 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,20 @@ subprojects {
gradle.taskGraph.hasTask(":artifactoryPublish")
}
}
normalization {
runtimeClasspath {
metaInf {
ignoreAttribute("Implementation-Version")
ignoreAttribute("Version")
ignoreAttribute("Implementation-Build")
ignoreAttribute("Build-Time")
ignoreAttribute("Plugin-BuildDate")
ignoreAttribute("Plugin-Display-Version")
ignoreAttribute("Plugin-Version")
ignoreAttribute("Plugin-RequirePlugins")
}
}
}
}

sonarqube {
Expand Down
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ description=Code Analyzer for Kotlin
projectTitle=Kotlin
kotlinVersion=2.0.21
org.gradle.jvmargs=-Xmx4096M
org.gradle.caching=true
kotlin.build.archivesTaskOutputAsFriendModule=false
Loading