OpenSearch/buildSrc/settings.gradle
Colin Goodheart-Smithe 4c6989212a Gets build to use elasticsearch-extras (elastic/elasticsearch#758)
* Gets build to use elasticsearch-extras

Also adds ci script for building repo on CI servers

To use this change you need to:
1. Clone elasticsearch: `git@github.com:elastic/elasticsearch.git`
2. create a directory at the same level as elasticsearch called `elasticsearch-extra`
3. Clone this repository into the `elasticsearch-extra` directory
4. Run `gradle build` from the `elasticsearch-extra/prelert-legacy` directory or run `gradle :prelert-legacy:build` from the `elasticsearch directory

* Adds USE_SSH option to ci script

* iter

Original commit: elastic/x-pack-elasticsearch@ea127dfef0
2017-01-20 15:11:21 +00:00

11 lines
538 B
Groovy

File extrasDir = new File(settingsDir, '../..').getCanonicalFile()
if (extrasDir.name.endsWith('-extra') == false) {
throw new GradleException("prelert-legacy must be checked out under an elasticsearch-extra directory, found ${extrasDir.name}")
}
File elasticsearchDir = new File(extrasDir.parentFile, extrasDir.name[0..-7])
if (elasticsearchDir.exists() == false) {
throw new GradleException("${elasticsearchDir.name} is missing as a sibling to ${extrasDir.name}")
}
project(':').projectDir = new File(elasticsearchDir, 'buildSrc')