2020-09-16 00:29:09 -04:00
|
|
|
import org.elasticsearch.gradle.VersionProperties
|
|
|
|
import org.elasticsearch.gradle.Architecture
|
|
|
|
|
2019-03-12 17:54:23 -04:00
|
|
|
apply plugin: 'elasticsearch.test.fixtures'
|
2020-09-16 00:29:09 -04:00
|
|
|
apply plugin: 'elasticsearch.internal-distribution-download'
|
|
|
|
|
|
|
|
task copyKeystore(type: Sync) {
|
|
|
|
from project(':x-pack:plugin:core')
|
|
|
|
.file('src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testnode.jks')
|
|
|
|
into "${buildDir}/certs"
|
|
|
|
doLast {
|
|
|
|
file("${buildDir}/certs").setReadable(true, false)
|
|
|
|
file("${buildDir}/certs/testnode.jks").setReadable(true, false)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
elasticsearch_distributions {
|
|
|
|
docker {
|
|
|
|
type = 'docker'
|
|
|
|
architecture = Architecture.current()
|
|
|
|
flavor = System.getProperty('tests.distribution', 'default')
|
|
|
|
version = VersionProperties.getElasticsearch()
|
|
|
|
failIfUnavailable = false // This ensures we skip this testing if Docker is unavailable
|
|
|
|
}
|
|
|
|
}
|
2020-09-17 11:55:19 -04:00
|
|
|
|
2020-09-16 00:29:09 -04:00
|
|
|
preProcessFixture {
|
|
|
|
dependsOn copyKeystore, elasticsearch_distributions.docker
|
|
|
|
doLast {
|
|
|
|
File file = file("${buildDir}/logs/node1")
|
|
|
|
file.mkdirs()
|
|
|
|
file.setWritable(true, false)
|
|
|
|
}
|
|
|
|
}
|
2017-08-04 11:44:08 -04:00
|
|
|
|
2020-09-16 00:29:09 -04:00
|
|
|
tasks.named('composeUp').configure {
|
|
|
|
dependsOn "preProcessFixture"
|
|
|
|
}
|
2020-09-17 11:55:19 -04:00
|
|
|
|
|
|
|
tasks.named('composePull').configure {
|
|
|
|
enabled = false // this task fails due to docker-compose oddities
|
|
|
|
}
|