Skip to content

Commit

Permalink
Remove bwc zips
Browse files Browse the repository at this point in the history
Signed-off-by: Joshua Li <joshuali925@gmail.com>
  • Loading branch information
joshuali925 committed Apr 12, 2022
1 parent f633f1a commit acec7c2
Show file tree
Hide file tree
Showing 10 changed files with 48 additions and 0 deletions.
36 changes: 36 additions & 0 deletions reports-scheduler/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,8 @@ Zip bundle = (Zip) project.getTasks().getByName("bundlePlugin");
integTest.dependsOn(bundle)
integTest.getClusters().forEach{c -> c.plugin(project.getObjects().fileProperty().value(bundle.getArchiveFile()))}

String jobSchedulerURL = "https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/" + opensearch_version.replace("-SNAPSHOT","") + "/latest/linux/x64/builds/opensearch/plugins/opensearch-job-scheduler-" + opensearch_build + ".zip"

testClusters.integTest {
testDistribution = "INTEG_TEST"
// need to install job-scheduler first, need to assemble job-scheduler first
Expand All @@ -260,6 +262,14 @@ testClusters.integTest {
return new RegularFile() {
@Override
File getAsFile() {
File dir = new File("src/test/resources/job-scheduler")
if (!dir.exists()) {
dir.mkdirs()
}
File file = new File(dir, "opensearch-job-scheduler-" + opensearch_build + ".zip")
if (!file.exists()) {
new URL(jobSchedulerURL).withInputStream{ ins -> file.withOutputStream{ it << ins }}
}
return fileTree("src/test/resources/job-scheduler").getSingleFile()
}
}
Expand All @@ -285,6 +295,8 @@ testClusters.integTest {
String bwcVersion = "1.13.0.0"
String baseName = "reportsSchedulerBwcCluster"
String bwcFilePath = "src/test/resources/bwc"
String bwcJobSchedulerURL = "https://d3g5vo6xdbdb9a.cloudfront.net/downloads/elasticsearch-plugins/opendistro-job-scheduler/opendistro-job-scheduler-" + bwcVersion + ".zip"
String bwcReportsSchedulerURL = "https://d3g5vo6xdbdb9a.cloudfront.net/downloads/elasticsearch-plugins/opendistro-reports-scheduler/opendistro-reports-scheduler-" + bwcVersion + ".zip"

2.times {i ->
testClusters {
Expand All @@ -298,6 +310,14 @@ String bwcFilePath = "src/test/resources/bwc"
return new RegularFile() {
@Override
File getAsFile() {
File dir = new File(bwcFilePath + "/job-scheduler/" + bwcVersion)
if (!dir.exists()) {
dir.mkdirs()
}
File file = new File(dir, "opendistro-job-scheduler-" + bwcVersion + ".zip")
if (!file.exists()) {
new URL(bwcJobSchedulerURL).withInputStream{ ins -> file.withOutputStream{ it << ins }}
}
return fileTree(bwcFilePath + "/job-scheduler/" + bwcVersion).getSingleFile()
}
}
Expand All @@ -309,6 +329,14 @@ String bwcFilePath = "src/test/resources/bwc"
return new RegularFile() {
@Override
File getAsFile() {
File dir = new File(bwcFilePath + "/reports-scheduler/" + bwcVersion)
if (!dir.exists()) {
dir.mkdirs()
}
File file = new File(dir, "opendistro-reports-scheduler-" + bwcVersion + ".zip")
if (!file.exists()) {
new URL(bwcReportsSchedulerURL).withInputStream{ ins -> file.withOutputStream{ it << ins }}
}
return fileTree(bwcFilePath + "/reports-scheduler/" + bwcVersion).getSingleFile()
}
}
Expand All @@ -333,6 +361,14 @@ task prepareBwcTests {
return new RegularFile() {
@Override
File getAsFile() {
File dir = new File(bwcFilePath + "/job-scheduler/" + project.version)
if (!dir.exists()) {
dir.mkdirs()
}
File file = new File(dir, "opendistro-reports-scheduler-" + project.version + ".zip")
if (!file.exists()) {
new URL(jobSchedulerURL).withInputStream{ ins -> file.withOutputStream{ it << ins }}
}
return fileTree(bwcFilePath + "/job-scheduler/" + project.version).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.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# ignore artifacts in this directory
*
*/
!.gitignore
Binary file not shown.
4 changes: 4 additions & 0 deletions reports-scheduler/src/test/resources/job-scheduler/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# ignore artifacts in this directory
*
*/
!.gitignore
Binary file not shown.

0 comments on commit acec7c2

Please sign in to comment.