Skip to content

Commit 5db65e6

Browse files
Updates build.gradle to conditionally download certificates (#1517) (#1519)
(cherry picked from commit f5e9ff7) Signed-off-by: Darshit Chanpura <dchanp@amazon.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent b25f913 commit 5db65e6

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
@@ -226,15 +226,18 @@ ext {
226226
licenseFile = rootProject.file('LICENSE.txt')
227227
noticeFile = rootProject.file('NOTICE.txt')
228228

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

0 commit comments

Comments
 (0)