Skip to content

Commit

Permalink
Use DRA artifacts for beats and ML dependencies (#89951) (#89985)
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-vieira committed Sep 10, 2022
1 parent e6605ae commit 87457c8
Showing 1 changed file with 22 additions and 6 deletions.
28 changes: 22 additions & 6 deletions x-pack/plugin/ml/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import org.elasticsearch.gradle.VersionProperties

apply plugin: 'elasticsearch.internal-es-plugin'
apply plugin: 'elasticsearch.internal-cluster-test'
apply plugin: 'elasticsearch.internal-test-artifact'
Expand All @@ -10,25 +12,39 @@ esplugin {
extendedPlugins = ['x-pack-autoscaling', 'lang-painless']
}

def localRepo = providers.systemProperty('build.ml_cpp.repo').orNull

repositories {
exclusiveContent {
filter {
includeGroup 'org.elasticsearch.ml'
}
forRepository {
ivy {
name "ml-cpp"
url providers.systemProperty('build.ml_cpp.repo').orElse('https://prelert-artifacts.s3.amazonaws.com').get()
metadataSources {
// no repository metadata, look directly for the artifact
artifact()
}
patternLayout {
artifact "maven/org/elasticsearch/ml/ml-cpp/[revision]/ml-cpp-[revision].[ext]"
if (localRepo) {
url localRepo
patternLayout {
artifact "maven/[orgPath]/[module]/[revision]/[module]-[revision](-[classifier]).[ext]"
}
} else {
url "https://artifacts-snapshot.elastic.co/"
patternLayout {
if (VersionProperties.isElasticsearchSnapshot()) {
artifact '/ml-cpp/[revision]/downloads/ml-cpp/[module]-[revision](-[classifier]).[ext]'
} else {
// When building locally we always use snapshot artifacts even if passing `-Dbuild.snapshot=false`.
// Release builds are always done with a local repo.
artifact '/ml-cpp/[revision]-SNAPSHOT/downloads/ml-cpp/[module]-[revision]-SNAPSHOT(-[classifier]).[ext]'
}
}
}
}
}
filter {
includeGroup 'org.elasticsearch.ml'
}
}
}

Expand Down

0 comments on commit 87457c8

Please sign in to comment.