From e61d1f4297a616f72edff1646a122f5678687b08 Mon Sep 17 00:00:00 2001 From: Amit Galitzky Date: Mon, 4 Apr 2022 22:22:58 +0000 Subject: [PATCH] added constants Signed-off-by: Amit Galitzky --- build.gradle | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/build.gradle b/build.gradle index d1981b634..46dd5647c 100644 --- a/build.gradle +++ b/build.gradle @@ -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 { @@ -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() @@ -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()