Skip to content

Commit

Permalink
added constants
Browse files Browse the repository at this point in the history
Signed-off-by: Amit Galitzky <[email protected]>
  • Loading branch information
amitgalitz committed Apr 4, 2022
1 parent 5160344 commit e61d1f4
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,12 @@ buildscript {
if (isSnapshot) {
opensearch_build += "-SNAPSHOT"
}
opensearch_no_snapshot = opensearch_version.substring(0, opensearch_version.indexOf("-", opensearch_version.indexOf("-") + 1))
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 @@ -259,10 +261,7 @@ testClusters.integTest {
@Override
File getAsFile() {
project.mkdir js_resource_folder
ant.get(src: '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',
ant.get(src: job_scheduler_build_download,
dest: js_resource_folder,
httpusecaches: false)
return fileTree(js_resource_folder).getSingleFile()
Expand Down Expand Up @@ -337,10 +336,7 @@ String bwcFilePath = "src/test/resources/org/opensearch/ad/bwc/"
return new RegularFile() {
@Override
File getAsFile() {
ant.get(src: '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',
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

0 comments on commit e61d1f4

Please sign in to comment.