Skip to content

Commit

Permalink
Merge branch 'opensearch-project:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
aksingh-es authored Apr 5, 2022
2 parents f611720 + 70a76b2 commit 4cca200
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ out/
.classpath
.vscode
bin/
._.DS_Store
._.DS_Store
src/test/resources/job-scheduler/
17 changes: 15 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,20 @@ buildscript {
// 2.0.0-alpha1-SNAPSHOT -> 2.0.0.0-alpha1-SNAPSHOT
version_tokens = opensearch_version.tokenize('-')
opensearch_build = version_tokens[0] + '.0'
job_scheduler_no_snapshot = opensearch_build
if (buildVersionQualifier) {
opensearch_build += "-${buildVersionQualifier}"
job_scheduler_no_snapshot += "-${buildVersionQualifier}"
}
if (isSnapshot) {
opensearch_build += "-SNAPSHOT"
}
opensearch_no_snapshot = opensearch_version.replace("-SNAPSHOT","")
js_resource_folder = "src/test/resources/job-scheduler"
common_utils_version = System.getProperty("common_utils.version", opensearch_build)
job_scheduler_version = System.getProperty("job_scheduler.version", opensearch_build)
job_scheduler_build_download = 'https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/' + opensearch_no_snapshot +
'/latest/linux/x64/builds/opensearch/plugins/opensearch-job-scheduler-' + job_scheduler_no_snapshot + '.zip'
}

repositories {
Expand Down Expand Up @@ -256,7 +262,11 @@ testClusters.integTest {
return new RegularFile() {
@Override
File getAsFile() {
return fileTree("src/test/resources/job-scheduler").getSingleFile()
project.mkdir js_resource_folder
ant.get(src: job_scheduler_build_download,
dest: js_resource_folder,
httpusecaches: false)
return fileTree(js_resource_folder).getSingleFile()
}
}
}
Expand Down Expand Up @@ -328,7 +338,10 @@ String bwcFilePath = "src/test/resources/org/opensearch/ad/bwc/"
return new RegularFile() {
@Override
File getAsFile() {
return fileTree(bwcFilePath + "job-scheduler/" + bwcVersion).getSingleFile()
ant.get(src: job_scheduler_build_download,
dest: bwcFilePath + "job-scheduler/" + opensearch_version,
httpusecaches: false)
return fileTree(bwcFilePath + "job-scheduler/" + opensearch_version).getSingleFile()
}
}
}
Expand Down
Binary file not shown.

0 comments on commit 4cca200

Please sign in to comment.