Convert ml-cpp repo to be part of elasticsearch-extra (elastic/elasticsearch#890)

This means we can reference the local build from within the prelert-legacy build script and build it directly

Original commit: elastic/x-pack-elasticsearch@14024841ab
This commit is contained in:
Colin Goodheart-Smithe 2017-02-08 14:39:22 +00:00 committed by GitHub
parent 91883ad57b
commit 30b6425b3a
2 changed files with 17 additions and 16 deletions

View File

@ -64,6 +64,8 @@ Vault vault = new Vault(config)
LogicalResponse secret = vault.logical().read("aws-dev/creds/prelertartifacts")
String mlAwsAccessKey = secret.data.get('access_key')
String mlAwsSecretKey = secret.data.get('secret_key')
// Sleeping to give AWS a chance to propagate the credentials
sleep(3000)
String envCppLocalDists = System.env.CPP_LOCAL_DISTS
if (envCppLocalDists != null) {

View File

@ -8,15 +8,23 @@ esplugin {
classname 'org.elasticsearch.xpack.ml.MlPlugin'
}
if (findProject(':machine-learning-cpp') != null) {
configurations.archives {
resolutionStrategy.dependencySubstitution {
substitute module("org.elasticsearch.ml:ml-cpp") with project(":machine-learning-cpp")
}
}
bundlePlugin.dependsOn ':machine-learning-cpp:buildUberZip'
}
configurations {
nativeBundle
archives
}
dependencies {
compile group: 'net.sf.supercsv', name: 'super-csv', version:"${supercsvVersion}"
nativeBundle group: "${project.group}", name: 'ml-cpp', version:"${project.version}", classifier: 'darwin-x86_64', ext: 'zip'
nativeBundle group: "${project.group}", name: 'ml-cpp', version:"${project.version}", classifier: 'linux-x86_64', ext: 'zip'
nativeBundle group: "${project.group}", name: 'ml-cpp', version:"${project.version}", classifier: 'windows-x86_64', ext: 'zip'
archives group: "${project.group}", name: 'ml-cpp', version:"${project.version}", ext: 'zip'
testCompile group: 'org.ini4j', name: 'ini4j', version:"${ini4jVersion}"
}
@ -28,18 +36,9 @@ integTest {
}
bundlePlugin {
if (project.cppLocalDists) {
def localCppBundles = fileTree(dir: cppLocalDists).matching { include "ml-cpp-${project.version}-*.zip" }
for (outputFile in localCppBundles) {
from(zipTree(outputFile)) {
duplicatesStrategy 'exclude'
}
}
} else {
for (outputFile in configurations.nativeBundle) {
from(zipTree(outputFile)) {
duplicatesStrategy 'exclude'
}
for (outputFile in configurations.archives) {
from(zipTree(outputFile)) {
duplicatesStrategy 'exclude'
}
}
}