Skip to content

Commit

Permalink
Remove zips used by bwc tests (#648)
Browse files Browse the repository at this point in the history
Signed-off-by: Joshua Li <[email protected]>
  • Loading branch information
joshuali925 authored Apr 13, 2022
1 parent 694589c commit 4633668
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 0 deletions.
9 changes: 9 additions & 0 deletions opensearch-observability/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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()
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# ignore artifacts in this directory
*
*/
!.gitignore
Binary file not shown.
Binary file not shown.

0 comments on commit 4633668

Please sign in to comment.