Skip to content

Commit cef4b9b

Browse files
committed
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
1 parent a6204a5 commit cef4b9b

File tree

2 files changed

+16
-15
lines changed

2 files changed

+16
-15
lines changed

build.gradle

-15
Original file line numberDiff line numberDiff line change
@@ -619,21 +619,6 @@ allprojects {
619619
}
620620
}
621621

622-
subprojects {
623-
// Common config when running with a FIPS-140 runtime JVM
624-
if (project.ext.has("inFipsJvm") && project.ext.inFipsJvm) {
625-
tasks.withType(Test) {
626-
systemProperty 'javax.net.ssl.trustStorePassword', 'password'
627-
systemProperty 'javax.net.ssl.keyStorePassword', 'password'
628-
}
629-
project.pluginManager.withPlugin("elasticsearch.testclusters") {
630-
project.testClusters.all {
631-
systemProperty 'javax.net.ssl.trustStorePassword', 'password'
632-
systemProperty 'javax.net.ssl.keyStorePassword', 'password'
633-
}
634-
}
635-
}
636-
}
637622

638623

639624

buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy

+16
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,22 @@ class BuildPlugin implements Plugin<Project> {
116116
configureTestTasks(project)
117117
configurePrecommit(project)
118118
configureDependenciesInfo(project)
119+
120+
// Common config when running with a FIPS-140 runtime JVM
121+
// Need to do it here to support external plugins
122+
if (project.ext.inFipsJvm) {
123+
project.tasks.withType(Test) {
124+
systemProperty 'javax.net.ssl.trustStorePassword', 'password'
125+
systemProperty 'javax.net.ssl.keyStorePassword', 'password'
126+
}
127+
project.pluginManager.withPlugin("elasticsearch.testclusters") {
128+
project.testClusters.all {
129+
systemProperty 'javax.net.ssl.trustStorePassword', 'password'
130+
systemProperty 'javax.net.ssl.keyStorePassword', 'password'
131+
}
132+
}
133+
}
134+
119135
}
120136

121137

0 commit comments

Comments
 (0)