From 33800bae5e9e6e43dba7a5519d0071564fc3cbc0 Mon Sep 17 00:00:00 2001 From: Colin Goodheart-Smithe Date: Thu, 19 Jan 2017 13:51:01 +0000 Subject: [PATCH] Changes build to make cpp artifact download correct with ml-cpp changes (elastic/elasticsearch#754) https://github.com/elastic/machine-learning-cpp/pull/3 changes the artifact names and paths for the ml-cpp build. This change makes it so the machine learning build references the artifacts in their new location. Original commit: elastic/x-pack-elasticsearch@d3916b6a7f527810373480345e8df1dd511745b1 --- elasticsearch/build.gradle | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/elasticsearch/build.gradle b/elasticsearch/build.gradle index 1a605a34d94..d2a1156148e 100644 --- a/elasticsearch/build.gradle +++ b/elasticsearch/build.gradle @@ -40,26 +40,27 @@ integTest { integTest.mustRunAfter noBootstrapTest +String projectGroupPath = project.group.replaceAll("\\.", "/") + task downloadCppDist(type: DownloadS3Task) { enabled project.cppLocalDists == '' description = 'Download C++ zips from S3 Bucket' bucket 'prelert-artifacts' destDir file("${buildDir}/cppDist") flatten true - download "maven/${project.group}/ml-cpp/${project.version}/ml-cpp-windows-x86_64-${project.version}.zip" - download "maven/${project.group}/ml-cpp/${project.version}/ml-cpp-linux-x86_64-${project.version}.zip" - download "maven/${project.group}/ml-cpp/${project.version}/ml-cpp-darwin-x86_64-${project.version}.zip" - outputs.file(file("${buildDir}/cppDist/ml-cpp-windows-x86_64-${project.version}.zip")) - outputs.file(file("${buildDir}/cppDist/ml-cpp-darwin-x86_64-${project.version}.zip")) - outputs.file(file("${buildDir}/cppDist/ml-cpp-linux-x86_64-${project.version}.zip")) + download "maven/${projectGroupPath}/ml-cpp/${project.version}/ml-cpp-${project.version}-windows-x86_64.zip" + download "maven/${projectGroupPath}/ml-cpp/${project.version}/ml-cpp-${project.version}-linux-x86_64.zip" + download "maven/${projectGroupPath}/ml-cpp/${project.version}/ml-cpp-${project.version}-darwin-x86_64.zip" + outputs.file(file("${buildDir}/cppDist/ml-cpp-${project.version}-windows-x86_64.zip")) + outputs.file(file("${buildDir}/cppDist/ml-cpp-${project.version}-darwin-x86_64.zip")) + outputs.file(file("${buildDir}/cppDist/ml-cpp-${project.version}-linux-x86_64.zip")) } bundlePlugin { if (project.cppLocalDists) { - String localZipFile = 'ml-cpp-' + + String localZipFile = 'ml-cpp-${project.version}-' + (project.isWindows ? "windows-x86_64" : (project.isMacOsX ? "darwin-x86_64" : - (project.isLinux ? "linux-x86_64" : "sunos-x86_64"))) + - "-${project.version}.zip" + (project.isLinux ? "linux-x86_64" : "sunos-x86_64"))) + ".zip" from { zipTree(cppLocalDists + '/' + localZipFile) } } else { for (outputFile in downloadCppDist.outputs.files) {