Move the FIPS configuration back to the build plugin (#41989)

* Move the FIPS configuration back to the build plugin

This is necesary for external users of build-tools.
Closes #41721
This commit is contained in:
Alpar Torok 2019-05-21 16:37:11 +03:00
parent a6204a5eaf
commit cef4b9ba76
2 changed files with 16 additions and 15 deletions

View File

@ -619,21 +619,6 @@ allprojects {
}
}
subprojects {
// Common config when running with a FIPS-140 runtime JVM
if (project.ext.has("inFipsJvm") && project.ext.inFipsJvm) {
tasks.withType(Test) {
systemProperty 'javax.net.ssl.trustStorePassword', 'password'
systemProperty 'javax.net.ssl.keyStorePassword', 'password'
}
project.pluginManager.withPlugin("elasticsearch.testclusters") {
project.testClusters.all {
systemProperty 'javax.net.ssl.trustStorePassword', 'password'
systemProperty 'javax.net.ssl.keyStorePassword', 'password'
}
}
}
}

View File

@ -116,6 +116,22 @@ class BuildPlugin implements Plugin<Project> {
configureTestTasks(project)
configurePrecommit(project)
configureDependenciesInfo(project)
// Common config when running with a FIPS-140 runtime JVM
// Need to do it here to support external plugins
if (project.ext.inFipsJvm) {
project.tasks.withType(Test) {
systemProperty 'javax.net.ssl.trustStorePassword', 'password'
systemProperty 'javax.net.ssl.keyStorePassword', 'password'
}
project.pluginManager.withPlugin("elasticsearch.testclusters") {
project.testClusters.all {
systemProperty 'javax.net.ssl.trustStorePassword', 'password'
systemProperty 'javax.net.ssl.keyStorePassword', 'password'
}
}
}
}