Skip to content

Commit

Permalink
Cleanup outdated artifactory setup
Browse files Browse the repository at this point in the history
  • Loading branch information
breskeby committed Nov 14, 2023
1 parent 0316b15 commit 80d3d16
Showing 1 changed file with 1 addition and 40 deletions.
41 changes: 1 addition & 40 deletions .ci/init.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ initscript {
}
}

boolean USE_ARTIFACTORY = false

if (System.getenv('VAULT_ADDR') == null) {
// When trying to reproduce errors outside of CI, it can be useful to allow this to just return rather than blowing up
if (System.getenv('CI') == null) {
Expand Down Expand Up @@ -50,45 +48,8 @@ final Vault vault = new Vault(
.engineVersion(1)
.token(vaultToken)
.build()
)
.withRetries(5, 1000)

).withRetries(5, 1000)

if (USE_ARTIFACTORY) {
final Map<String, String> artifactoryCredentials = vault.logical()
.read("${vaultPathPrefix}/artifactory.elstc.co")
.getData()
logger.info("Using elastic artifactory repos")
Closure configCache = {
return {
name "artifactory-gradle-release"
url "https://artifactory.elstc.co/artifactory/gradle-release"
credentials {
username artifactoryCredentials.get("username")
password artifactoryCredentials.get("token")
}
}
}
settingsEvaluated { settings ->
settings.pluginManagement {
repositories {
maven configCache()
}
}
}
projectsLoaded {
allprojects {
buildscript {
repositories {
maven configCache()
}
}
repositories {
maven configCache()
}
}
}
}

gradle.settingsEvaluated { settings ->
settings.pluginManager.withPlugin("com.gradle.enterprise") {
Expand Down

0 comments on commit 80d3d16

Please sign in to comment.