Skip to content

Commit

Permalink
refactor: Upgrade Develocity (#15)
Browse files Browse the repository at this point in the history
* refactor: Upgrade Develocity

Use this link to re-run the recipe: https://app.moderne.io/recipes/builder/Zb7BQc324?organizationId=NTUyM2Y5NWYtN2RjMC00Y2FiLWJmMmYtMmY2MmMzNjU1OWQz

Co-authored-by: Moderne <[email protected]>

* Adopt access key

---------

Co-authored-by: Moderne <[email protected]>
  • Loading branch information
timtebeek and TeamModerne authored Feb 29, 2024
1 parent 7eecb41 commit f78a6af
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ jobs:
uses: openrewrite/gh-automation/.github/workflows/ci-gradle.yml@main
secrets:
gradle_enterprise_access_key: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
gradle_enterprise_cache_username: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USERNAME }}
gradle_enterprise_cache_password: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }}
ossrh_username: ${{ secrets.OSSRH_USERNAME }}
ossrh_token: ${{ secrets.OSSRH_TOKEN }}
ossrh_signing_key: ${{ secrets.OSSRH_SIGNING_KEY }}
Expand Down
15 changes: 4 additions & 11 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,12 @@ plugins {
gradleEnterprise {
val isCiServer = System.getenv("CI")?.equals("true") ?: false
server = "https://ge.openrewrite.org/"
val gradleCacheRemoteUsername: String? = System.getenv("GRADLE_ENTERPRISE_CACHE_USERNAME")
val gradleCacheRemotePassword: String? = System.getenv("GRADLE_ENTERPRISE_CACHE_PASSWORD")

buildCache {
remote(HttpBuildCache::class) {
url = uri("https://ge.openrewrite.org/cache/")
isPush = isCiServer
if (!gradleCacheRemoteUsername.isNullOrBlank() && !gradleCacheRemotePassword.isNullOrBlank()) {
credentials {
username = gradleCacheRemoteUsername
password = gradleCacheRemotePassword
}
}
remote(gradleEnterprise.buildCache) {
isEnabled = true
val accessKey = System.getenv("GRADLE_ENTERPRISE_ACCESS_KEY")
isPush = isCiServer && !accessKey.isNullOrBlank()
}
}

Expand Down

0 comments on commit f78a6af

Please sign in to comment.