Skip to content

Commit 46b584b

Browse files
authored
Add sbt-develocity-common-custom-user-data (#23199)
This sbt plugin can be used to simplify the build. Currently, there's some custom logic that extracts some environment variables set by CI, so that their values show up in Develocity. sbt-develocity-common-custom-user-data actually extracts the same values, except `GITHUB_REPOSITORY`, and can be used instead. This plugin is open source, distributed under Apache 2 license. Its sources are available at https://github.com/gradle/common-custom-user-data-sbt-plugin. Differences: - Tags: - "Local" becomes "LOCAL" - Custom values: - "GITHUB_REPOSITORY" is not extracted anymore. - "GITHUB_SHA" becomes "Git commit id" - "GITHUB_WORKFLOW" becomes "CI workflow" - Links: - "GitHub Run" becomes "GitHub Actions build" - "GitHub Commit" becomes "GitHub Source" In addition, the following will be captured: - Tags: - The OS name (e.g. Linux, Mac OS X, etc.) - The IDE, if available (e.g. IntelliJ, Eclipse, etc.) - The Git branch name (on CI only) - "Dirty", if the repo is dirty (on CI only) - Custom values: - "$ide version", containing the IDE version, if available - "CI provider" (e.g. "GitHub Actions") - "Git repository" (e.g. "https://github.com/scala/scala3") - "PR branch" (e.g. mduhem/sbt-ccud) - "Git status", containing the git status (on CI only) - Links: - "CI workflow", linking to other Build Scans running the same CI workflow - "CI run", linking to other Build Scans produced in the same CI run - "Git commit id", linking to other Build Scans produced using the same commit
2 parents 8f0d12b + 375630f commit 46b584b

File tree

3 files changed

+2
-33
lines changed

3 files changed

+2
-33
lines changed

project/Build.scala

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -344,9 +344,6 @@ object Build {
344344
buildScan
345345
.withPublishing(Publishing.onlyIf(_.authenticated))
346346
.withBackgroundUpload(!isInsideCI)
347-
.withTag(if (isInsideCI) "CI" else "Local")
348-
.withLinks(buildScan.links ++ GithubEnv.develocityLinks)
349-
.withValues(buildScan.values ++ GithubEnv.develocityValues)
350347
.withObfuscation(buildScan.obfuscation.withIpAddresses(_.map(_ => "0.0.0.0")))
351348
)
352349
.withBuildCache(

project/GithubEnv.scala

Lines changed: 0 additions & 30 deletions
This file was deleted.

project/plugins.sbt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,6 @@ resolvers +=
2525

2626
addSbtPlugin("com.gradle" % "sbt-develocity" % "1.2.2-rc-1")
2727

28+
addSbtPlugin("com.gradle" % "sbt-develocity-common-custom-user-data" % "1.1")
29+
2830
addSbtPlugin("com.github.sbt" % "sbt-jdi-tools" % "1.2.0")

0 commit comments

Comments
 (0)