Skip to content

Commit f5e9ff7

Browse files
Updates build.gradle to conditionally download certificates (#1517)
Signed-off-by: Darshit Chanpura <dchanp@amazon.com>
1 parent 967b0aa commit f5e9ff7

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

build.gradle

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -228,15 +228,18 @@ ext {
228228
licenseFile = rootProject.file('LICENSE.txt')
229229
noticeFile = rootProject.file('NOTICE.txt')
230230

231-
['esnode.pem', 'esnode-key.pem', 'kirk.pem', 'kirk-key.pem', 'root-ca.pem', 'sample.pem', 'test-kirk.jks'].forEach { file ->
232-
File local = getLayout().getBuildDirectory().file(file).get().getAsFile()
233-
download.run {
234-
src "https://raw.githubusercontent.com/opensearch-project/security/refs/heads/main/bwc-test/src/test/resources/security/" + file
235-
dest local
236-
overwrite false
237-
}
238-
processResources {
239-
from(local)
231+
runIntegTestWithSecurityPlugin= System.getProperty("security")
232+
if (runIntegTestWithSecurityPlugin == "true") {
233+
['esnode.pem', 'esnode-key.pem', 'kirk.pem', 'kirk-key.pem', 'root-ca.pem', 'sample.pem', 'test-kirk.jks'].forEach { file ->
234+
File local = getLayout().getBuildDirectory().file(file).get().getAsFile()
235+
download.run {
236+
src "https://raw.githubusercontent.com/opensearch-project/security/refs/heads/main/bwc-test/src/test/resources/security/" + file
237+
dest local
238+
overwrite false
239+
}
240+
processResources {
241+
from(local)
242+
}
240243
}
241244
}
242245
}

0 commit comments

Comments
 (0)