From 1d23ee71631b90655cf81f18621b113b0c9f193e Mon Sep 17 00:00:00 2001 From: Derek Ho Date: Tue, 28 Feb 2023 10:09:40 -0500 Subject: [PATCH 1/3] use maven Signed-off-by: Derek Ho --- build.gradle | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/build.gradle b/build.gradle index fbf5eb5a..d867c08d 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}" @@ -292,8 +294,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 @@ -303,15 +303,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() } } } @@ -403,15 +395,7 @@ task prepareBwcTests { return new RegularFile() { @Override File getAsFile() { - File dir = new File(bwcFilePath + "/job-scheduler/" + project.version) - if (!dir.exists()) { - dir.mkdirs() - } - File file = new File(dir, "opensearch-reports-scheduler-" + project.version + ".zip") - if (!file.exists()) { - new URL(jobSchedulerURL).withInputStream{ ins -> file.withOutputStream{ it << ins }} - } - return fileTree(bwcFilePath + "/job-scheduler/" + project.version).getSingleFile() + return configurations.zipArchive.asFileTree.getSingleFile() } } } From d33fa4e5e5e15898843c5e7a55dc06b65fab7f2d Mon Sep 17 00:00:00 2001 From: Derek Ho Date: Tue, 28 Feb 2023 10:11:57 -0500 Subject: [PATCH 2/3] bwc version to 2.7.0 bump Signed-off-by: Derek Ho --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index d867c08d..a0e24917 100644 --- a/build.gradle +++ b/build.gradle @@ -325,7 +325,7 @@ testClusters.integTest { } // For job-scheduler and reports-scheduler, the latest opensearch releases appear to be 1.1.0.0. -String baseVersion = "2.6.0" +String baseVersion = "2.7.0" String bwcVersion = baseVersion + ".0" String baseName = "reportsSchedulerBwcCluster" String bwcFilePath = "src/test/resources/bwc" From c59a017f2211b75b353c5c0131b460491665c878 Mon Sep 17 00:00:00 2001 From: Derek Ho Date: Mon, 6 Mar 2023 15:11:57 -0500 Subject: [PATCH 3/3] hard code zips Signed-off-by: Derek Ho --- build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index a0e24917..1b706ef7 100644 --- a/build.gradle +++ b/build.gradle @@ -329,8 +329,8 @@ String baseVersion = "2.7.0" String bwcVersion = baseVersion + ".0" String baseName = "reportsSchedulerBwcCluster" String bwcFilePath = "src/test/resources/bwc" -String bwcJobSchedulerURL = "https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/${baseVersion}/latest/linux/x64/tar/builds/opensearch/plugins/opensearch-job-scheduler-${bwcVersion}.zip" -String bwcReportsSchedulerURL = "https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/${baseVersion}/latest/linux/x64/tar/builds/opensearch/plugins/opensearch-reports-scheduler-${bwcVersion}.zip" +String bwcJobSchedulerURL = "https://aws.oss.sonatype.org/content/repositories/snapshots/org/opensearch/plugin/opensearch-job-scheduler/2.7.0.0-SNAPSHOT/opensearch-job-scheduler-2.7.0.0-20230305.020625-11.zip" +String bwcReportsSchedulerURL = "https://aws.oss.sonatype.org/content/repositories/snapshots/org/opensearch/plugin/opensearch-reports-scheduler/2.7.0.0-SNAPSHOT/opensearch-reports-scheduler-2.7.0.0-20230306.195720-1.zip" 2.times {i -> testClusters {