OpenSearch/x-pack/test/idp-fixture/build.gradle

43 lines
1.2 KiB
Groovy
Raw Normal View History

import org.elasticsearch.gradle.VersionProperties
import org.elasticsearch.gradle.Architecture
apply plugin: 'elasticsearch.test.fixtures'
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
}
}
preProcessFixture {
dependsOn copyKeystore, elasticsearch_distributions.docker
doLast {
File file = file("${buildDir}/logs/node1")
file.mkdirs()
file.setWritable(true, false)
}
}
tasks.named('composeUp').configure {
dependsOn "preProcessFixture"
}
tasks.named('composePull').configure {
enabled = false // this task fails due to docker-compose oddities
}