From daf83be9b7c274a6054c829e8dcb6e4325305be2 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 27 Sep 2024 19:19:34 +0000 Subject: [PATCH] Add job scheduler plugin to test cluster (#2957) Signed-off-by: Louis Chu (cherry picked from commit c1e623d6d3464056a4b16ae7e51dca218d73a5b6) Signed-off-by: github-actions[bot] --- plugin/build.gradle | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/plugin/build.gradle b/plugin/build.gradle index 17b0ae8573..ebfceadb0f 100644 --- a/plugin/build.gradle +++ b/plugin/build.gradle @@ -1,3 +1,5 @@ +import java.util.concurrent.Callable + /* * Copyright OpenSearch Contributors * SPDX-License-Identifier: Apache-2.0 @@ -113,6 +115,11 @@ configurations.all { resolutionStrategy.force "org.apache.httpcomponents:httpclient:4.5.14" resolutionStrategy.force "org.jetbrains.kotlin:kotlin-stdlib-common:1.6.0" } + +configurations { + zipArchive +} + compileJava { options.compilerArgs.addAll(["-processor", 'lombok.launch.AnnotationProcessorHider$AnnotationProcessor']) } @@ -143,6 +150,8 @@ dependencies { testImplementation group: 'org.mockito', name: 'mockito-core', version: "${versions.mockito}" testImplementation group: 'org.mockito', name: 'mockito-junit-jupiter', version: "${versions.mockito}" testImplementation 'org.junit.jupiter:junit-jupiter:5.9.3' + + zipArchive group: 'org.opensearch.plugin', name:'opensearch-job-scheduler', version: "${opensearch_build}" } test { @@ -252,7 +261,24 @@ afterEvaluate { } } +def getJobSchedulerPlugin() { + provider(new Callable() { + @Override + RegularFile call() throws Exception { + return new RegularFile() { + @Override + File getAsFile() { + return configurations.zipArchive.asFileTree.matching { + include '**/opensearch-job-scheduler*' + }.singleFile + } + } + } + }) +} + testClusters.integTest { + plugin(getJobSchedulerPlugin()) plugin(project.tasks.bundlePlugin.archiveFile) testDistribution = "ARCHIVE"