diff --git a/opensearch-observability/build.gradle b/opensearch-observability/build.gradle index 6f5d6fcbb..d33bdbebb 100644 --- a/opensearch-observability/build.gradle +++ b/opensearch-observability/build.gradle @@ -261,6 +261,7 @@ testClusters.integTest { String bwcVersion = "1.2.0-SNAPSHOT" String baseName = "obsBwcCluster" String bwcFilePath = "src/test/kotlin/org/opensearch/observability/resources/bwc/" +String remoteFileURL = "https://github.com/opensearch-project/observability/releases/download/1.2.0.0/opensearch-observability-1.2.0.0.zip" 2.times {i -> testClusters { @@ -274,6 +275,14 @@ String bwcFilePath = "src/test/kotlin/org/opensearch/observability/resources/bwc return new RegularFile() { @Override File getAsFile() { + File dir = new File(bwcFilePath + bwcVersion) + if (!dir.exists()) { + dir.mkdirs() + } + File file = new File(dir, "opensearch-observability-1.2.0.0-SNAPSHOT.zip") + if (!file.exists()) { + new URL(remoteFileURL).withInputStream{ ins -> file.withOutputStream{ it << ins }} + } return fileTree(bwcFilePath + bwcVersion).getSingleFile() } } diff --git a/opensearch-observability/src/test/kotlin/org/opensearch/observability/resources/bwc/.gitignore b/opensearch-observability/src/test/kotlin/org/opensearch/observability/resources/bwc/.gitignore new file mode 100644 index 000000000..99f6ad50f --- /dev/null +++ b/opensearch-observability/src/test/kotlin/org/opensearch/observability/resources/bwc/.gitignore @@ -0,0 +1,4 @@ +# ignore artifacts in this directory +* +*/ +!.gitignore diff --git a/opensearch-observability/src/test/kotlin/org/opensearch/observability/resources/bwc/1.1.0-SNAPSHOT/opensearch-notebooks-1.1.0.0-SNAPSHOT.zip b/opensearch-observability/src/test/kotlin/org/opensearch/observability/resources/bwc/1.1.0-SNAPSHOT/opensearch-notebooks-1.1.0.0-SNAPSHOT.zip deleted file mode 100644 index c51b51033..000000000 Binary files a/opensearch-observability/src/test/kotlin/org/opensearch/observability/resources/bwc/1.1.0-SNAPSHOT/opensearch-notebooks-1.1.0.0-SNAPSHOT.zip and /dev/null differ diff --git a/opensearch-observability/src/test/kotlin/org/opensearch/observability/resources/bwc/1.2.0-SNAPSHOT/opensearch-observability-1.2.0.0-SNAPSHOT.zip b/opensearch-observability/src/test/kotlin/org/opensearch/observability/resources/bwc/1.2.0-SNAPSHOT/opensearch-observability-1.2.0.0-SNAPSHOT.zip deleted file mode 100644 index ec0aa0dd9..000000000 Binary files a/opensearch-observability/src/test/kotlin/org/opensearch/observability/resources/bwc/1.2.0-SNAPSHOT/opensearch-observability-1.2.0.0-SNAPSHOT.zip and /dev/null differ