Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[backport to 1.3] removed bwc zips and fetching opendistro from cloudfront (#505) #565

Merged
merged 1 commit into from
Jun 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 33 additions & 8 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ buildscript {
'/latest/linux/x64/tar/builds/opensearch/plugins/opensearch-job-scheduler-' + plugin_version + '.0.zip'
anomaly_detection_build_download = 'https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/' + plugin_version +
'/latest/linux/x64/tar/builds/opensearch/plugins/opensearch-anomaly-detection-' + plugin_version + '.0.zip'
bwcOpenDistroADDownload = 'https://d3g5vo6xdbdb9a.cloudfront.net/downloads/elasticsearch-plugins/' +
'opendistro-anomaly-detection/opendistro-anomaly-detection-1.13.0.0.zip'
bwcOpenDistroJSDownload = 'https://d3g5vo6xdbdb9a.cloudfront.net/downloads/elasticsearch-plugins/' +
'opendistro-job-scheduler/opendistro-job-scheduler-1.13.0.0.zip'
}

repositories {
Expand Down Expand Up @@ -325,8 +329,8 @@ task integTestRemote(type: RestIntegTestTask) {
String bwcVersion = "1.13.0.0"
String baseName = "adBwcCluster"
String bwcFilePath = "src/test/resources/org/opensearch/ad/bwc/"
String bwcJobSchedulerPath = bwcFilePath + "job-scheduler/" + opensearch_build
String bwcAnomalyDetectionPath = bwcFilePath + "anomaly-detection/" + opensearch_build
String bwcJobSchedulerPath = bwcFilePath + "job-scheduler/"
String bwcAnomalyDetectionPath = bwcFilePath + "anomaly-detection/"

2.times {i ->
testClusters {
Expand All @@ -340,7 +344,14 @@ String bwcAnomalyDetectionPath = bwcFilePath + "anomaly-detection/" + opensearch
return new RegularFile() {
@Override
File getAsFile() {
return fileTree(bwcFilePath + "job-scheduler/" + bwcVersion).getSingleFile()
if (new File("$project.rootDir/$bwcFilePath/job-scheduler/$bwcVersion").exists()) {
project.delete(files("$project.rootDir/$bwcFilePath/job-scheduler/$bwcVersion"))
}
project.mkdir bwcJobSchedulerPath + bwcVersion
ant.get(src: bwcOpenDistroJSDownload,
dest: bwcJobSchedulerPath + bwcVersion,
httpusecaches: false)
return fileTree(bwcJobSchedulerPath + bwcVersion).getSingleFile()
}
}
}
Expand All @@ -351,7 +362,14 @@ String bwcAnomalyDetectionPath = bwcFilePath + "anomaly-detection/" + opensearch
return new RegularFile() {
@Override
File getAsFile() {
return fileTree(bwcFilePath + "anomaly-detection/" + bwcVersion).getSingleFile()
if (new File("$project.rootDir/$bwcFilePath/anomaly-detection/$bwcVersion").exists()) {
project.delete(files("$project.rootDir/$bwcFilePath/anomaly-detection/$bwcVersion"))
}
project.mkdir bwcAnomalyDetectionPath + bwcVersion
ant.get(src: bwcOpenDistroADDownload,
dest: bwcAnomalyDetectionPath + bwcVersion,
httpusecaches: false)
return fileTree(bwcAnomalyDetectionPath + bwcVersion).getSingleFile()
}
}
}
Expand All @@ -372,11 +390,11 @@ List<Provider<RegularFile>> plugins = [
if (new File("$project.rootDir/$bwcFilePath/job-scheduler/$opensearch_build").exists()) {
project.delete(files("$project.rootDir/$bwcFilePath/job-scheduler/$opensearch_build"))
}
project.mkdir bwcJobSchedulerPath
project.mkdir bwcJobSchedulerPath + opensearch_build
ant.get(src: job_scheduler_build_download,
dest: bwcJobSchedulerPath,
dest: bwcJobSchedulerPath + opensearch_build,
httpusecaches: false)
return fileTree(bwcJobSchedulerPath).getSingleFile()
return fileTree(bwcJobSchedulerPath + opensearch_build).getSingleFile()
}
}
}
Expand All @@ -387,7 +405,14 @@ List<Provider<RegularFile>> plugins = [
return new RegularFile() {
@Override
File getAsFile() {
return fileTree(bwcFilePath + "anomaly-detection/" + project.version).getSingleFile()
if (new File("$project.rootDir/$bwcFilePath/anomaly-detection/$opensearch_build").exists()) {
project.delete(files("$project.rootDir/$bwcFilePath/anomaly-detection/$opensearch_build"))
}
project.mkdir bwcAnomalyDetectionPath + opensearch_build
ant.get(src: anomaly_detection_build_download,
dest: bwcAnomalyDetectionPath + opensearch_build,
httpusecaches: false)
return fileTree(bwcAnomalyDetectionPath + opensearch_build).getSingleFile()
}
}
}
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.