diff --git a/build.gradle b/build.gradle index 3018878e..5e4e9234 100644 --- a/build.gradle +++ b/build.gradle @@ -11,9 +11,7 @@ buildscript { opensearch_group = "org.opensearch" isSnapshot = "true" == System.getProperty("build.snapshot", "true") opensearch_version = System.getProperty("opensearch.version", "3.0.0-SNAPSHOT") - opensearch_plugin_version = System.getProperty("bwc.version", "2.12.0.0") buildVersionQualifier = System.getProperty("build.version_qualifier", "") - // 2.0.0-rc1-SNAPSHOT -> 2.0.0.0-rc1-SNAPSHOT version_tokens = opensearch_version.tokenize('-') opensearch_build = version_tokens[0] + '.0' if (buildVersionQualifier) { @@ -261,11 +259,10 @@ ext.getPluginResource = { download_to_folder, download_from_src -> } String baseName = "asynSearchCluster" -String bwcVersionShort = "2.12.0" +String bwcVersionShort = "2.14.0" String bwcVersion = bwcVersionShort + ".0" String bwcFilePath = "src/test/resources/org/opensearch/search/asynchronous/bwc/" String bwcRemoteFile = "https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/"+ bwcVersionShort + "/latest/linux/x64/tar/builds/opensearch/plugins/opensearch-asynchronous-search-"+ bwcVersion +".zip" -//getPluginResource(bwcFilePath + bwcVersion, bwcRemoteFile) // Creates two test clusters of previous version and loads opensearch plugin of bwcVersion 2.times { i -> testClusters { @@ -279,7 +276,11 @@ String bwcRemoteFile = "https://ci.opensearch.org/ci/dbc/distribution-build-open return new RegularFile() { @Override File getAsFile() { - return fileTree(bwcFilePath + opensearch_plugin_version).getSingleFile() + if (new File(bwcFilePath + bwcVersion).exists()) { + project.delete(files(bwcFilePath + bwcVersion)) + } + getPluginResource(bwcFilePath + bwcVersion, bwcRemoteFile) + return fileTree(bwcFilePath + bwcVersion).getSingleFile() } } }