From eec04df924682cb1ee7a05c5ab455699e665f02d Mon Sep 17 00:00:00 2001 From: Derek Ho Date: Mon, 6 Mar 2023 20:20:56 -0500 Subject: [PATCH] Pull Job scheduler from maven instead of jenkins (#663) * use maven Signed-off-by: Derek Ho * bwc version to 2.7.0 bump Signed-off-by: Derek Ho * hard code zips Signed-off-by: Derek Ho --------- Signed-off-by: Derek Ho Signed-off-by: Rupal Mahajan --- build.gradle | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/build.gradle b/build.gradle index 61060122..0397057c 100644 --- a/build.gradle +++ b/build.gradle @@ -116,6 +116,7 @@ configurations { ktlint testCompile testRuntime + zipArchive } detekt { @@ -167,6 +168,7 @@ repositories { } dependencies { + zipArchive group: 'org.opensearch.plugin', name:'opensearch-job-scheduler', version: "${opensearch_build}" implementation "org.opensearch:opensearch:${opensearch_version}" implementation "org.jetbrains.kotlin:kotlin-stdlib:${kotlin_version}" implementation "org.jetbrains.kotlin:kotlin-stdlib-common:${kotlin_version}" @@ -293,8 +295,6 @@ Zip bundle = (Zip) project.getTasks().getByName("bundlePlugin"); integTest.dependsOn(bundle) integTest.getClusters().forEach{c -> c.plugin(project.getObjects().fileProperty().value(bundle.getArchiveFile()))} -String jobSchedulerURL = "https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/" + opensearch_version.replace("-SNAPSHOT", "") + "/latest/linux/x64/tar/builds/opensearch/plugins/opensearch-job-scheduler-" + opensearch_build.replace("-SNAPSHOT", "") + ".zip" - testClusters.integTest { testDistribution = "INTEG_TEST" // need to install job-scheduler first, need to assemble job-scheduler first @@ -304,15 +304,7 @@ testClusters.integTest { return new RegularFile() { @Override File getAsFile() { - File dir = new File("src/test/resources/job-scheduler") - if (!dir.exists()) { - dir.mkdirs() - } - File file = new File(dir, "opensearch-job-scheduler-" + opensearch_build + ".zip") - if (!file.exists()) { - new URL(jobSchedulerURL).withInputStream{ ins -> file.withOutputStream{ it << ins }} - } - return fileTree("src/test/resources/job-scheduler").getSingleFile() + return configurations.zipArchive.asFileTree.getSingleFile() } } }