mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-17 02:14:54 +00:00
Disable the use of artifactory in CI (#47100)
(cherry picked from commit cbe8b3645f74da0a7e2794536d84a3c46905e49e)
This commit is contained in:
parent
67f0ffd134
commit
f4e32a5f5f
@ -10,6 +10,8 @@ initscript {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
boolean USE_ARTIFACTORY=false
|
||||||
|
|
||||||
['VAULT_ADDR', 'VAULT_ROLE_ID', 'VAULT_SECRET_ID'].each {
|
['VAULT_ADDR', 'VAULT_ROLE_ID', 'VAULT_SECRET_ID'].each {
|
||||||
if (System.env."$it" == null) {
|
if (System.env."$it" == null) {
|
||||||
throw new GradleException("$it must be set!")
|
throw new GradleException("$it must be set!")
|
||||||
@ -37,39 +39,44 @@ final Vault vault = new Vault(
|
|||||||
)
|
)
|
||||||
.withRetries(5, 1000)
|
.withRetries(5, 1000)
|
||||||
|
|
||||||
final Map<String,String> artifactoryCredentials = vault.logical()
|
|
||||||
.read("secret/elasticsearch-ci/artifactory.elstc.co")
|
|
||||||
.getData();
|
|
||||||
|
|
||||||
logger.info("Using elastic artifactory repos")
|
if (USE_ARTIFACTORY) {
|
||||||
Closure configCache = {
|
final Map<String,String> artifactoryCredentials = vault.logical()
|
||||||
return {
|
.read("secret/elasticsearch-ci/artifactory.elstc.co")
|
||||||
name "artifactory-gradle-release"
|
.getData();
|
||||||
url "https://artifactory.elstc.co/artifactory/gradle-release"
|
logger.info("Using elastic artifactory repos")
|
||||||
credentials {
|
Closure configCache = {
|
||||||
username artifactoryCredentials.get("username")
|
return {
|
||||||
password artifactoryCredentials.get("token")
|
name "artifactory-gradle-release"
|
||||||
|
url "https://artifactory.elstc.co/artifactory/gradle-release"
|
||||||
|
credentials {
|
||||||
|
username artifactoryCredentials.get("username")
|
||||||
|
password artifactoryCredentials.get("token")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
settingsEvaluated { settings ->
|
||||||
settingsEvaluated { settings ->
|
settings.pluginManagement {
|
||||||
settings.pluginManagement {
|
|
||||||
repositories {
|
|
||||||
maven configCache()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
projectsLoaded {
|
|
||||||
allprojects {
|
|
||||||
buildscript {
|
|
||||||
repositories {
|
repositories {
|
||||||
maven configCache()
|
maven configCache()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
repositories {
|
}
|
||||||
maven configCache()
|
projectsLoaded {
|
||||||
|
allprojects {
|
||||||
|
buildscript {
|
||||||
|
repositories {
|
||||||
|
maven configCache()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
repositories {
|
||||||
|
maven configCache()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
projectsLoaded {
|
||||||
rootProject {
|
rootProject {
|
||||||
project.pluginManager.withPlugin('com.gradle.build-scan') {
|
project.pluginManager.withPlugin('com.gradle.build-scan') {
|
||||||
buildScan.server = 'https://gradle-enterprise.elastic.co'
|
buildScan.server = 'https://gradle-enterprise.elastic.co'
|
||||||
@ -77,6 +84,7 @@ projectsLoaded {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
final String buildCacheUrl = System.getProperty('org.elasticsearch.build.cache.url')
|
final String buildCacheUrl = System.getProperty('org.elasticsearch.build.cache.url')
|
||||||
final boolean buildCachePush = Boolean.valueOf(System.getProperty('org.elasticsearch.build.cache.push', 'false'))
|
final boolean buildCachePush = Boolean.valueOf(System.getProperty('org.elasticsearch.build.cache.push', 'false'))
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user