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@d3916b6a7f
This commit is contained in:
Colin Goodheart-Smithe 2017-01-19 13:51:01 +00:00 committed by GitHub
parent 0b084ea0e6
commit 33800bae5e
1 changed files with 10 additions and 9 deletions

View File

@ -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) {