Skip to content

Commit d1b473e

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 6f32bfa commit d1b473e

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,22 @@ class BuildPlugin implements Plugin<Project> {
113113
configureTestTasks(project)
114114
configurePrecommit(project)
115115
configureDependenciesInfo(project)
116+
117+
// Common config when running with a FIPS-140 runtime JVM
118+
// Need to do it here to support external plugins
119+
if (project.ext.inFipsJvm) {
120+
project.tasks.withType(Test) {
121+
systemProperty 'javax.net.ssl.trustStorePassword', 'password'
122+
systemProperty 'javax.net.ssl.keyStorePassword', 'password'
123+
}
124+
project.pluginManager.withPlugin("elasticsearch.testclusters") {
125+
project.testClusters.all {
126+
systemProperty 'javax.net.ssl.trustStorePassword', 'password'
127+
systemProperty 'javax.net.ssl.keyStorePassword', 'password'
128+
}
129+
}
130+
}
131+
116132
}
117133

118134

0 commit comments

Comments
 (0)