[ML] Do not download the ml-cpp zip when building it locally (elastic/x-pack-elasticsearch#2262)
When the machine-learning-cpp repo is built locally, the zip file it creates is preferred over that downloaded from s3 when creating the overall x-pack-elasticsearch zip. However, prior to this change the build would ALSO download an ml-cpp zip from s3, and just not use it. Original commit: elastic/x-pack-elasticsearch@bd71637edd
This commit is contained in:
parent
f3a7d46698
commit
db8885a46e
|
@ -120,7 +120,9 @@ S3Object getZip() {
|
|||
File snapshotZip = new File(buildDir, "download/ml-cpp-${version}.zip")
|
||||
task downloadMachineLearningSnapshot {
|
||||
onlyIf {
|
||||
// skip for offline builds, just rely on the artifact already having been downloaded before here
|
||||
// skip if machine-learning-cpp is being built locally
|
||||
findProject(':machine-learning-cpp') == null &&
|
||||
// skip for offline builds - just rely on the artifact already having been downloaded before here
|
||||
project.gradle.startParameter.isOffline() == false
|
||||
}
|
||||
doFirst {
|
||||
|
@ -138,8 +140,9 @@ task downloadMachineLearningSnapshot {
|
|||
}
|
||||
|
||||
gradle.taskGraph.whenReady { taskGraph ->
|
||||
// skip if machine-learning-cpp is being built locally and also for offline builds
|
||||
if (findProject(':machine-learning-cpp') == null && project.gradle.startParameter.isOffline() == false) {
|
||||
// do validation of token/java version up front, don't wait for the task to run
|
||||
if (taskGraph.hasTask(downloadMachineLearningSnapshot)) {
|
||||
checkJavaVersion()
|
||||
setupVaultAuthMethod()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue