Skip to content

Commit c1e623d

Browse files
authored
Add job scheduler plugin to test cluster (#2957)
Signed-off-by: Louis Chu <clingzhi@amazon.com>
1 parent ef5d14a commit c1e623d

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

plugin/build.gradle

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import java.util.concurrent.Callable
2+
13
/*
24
* Copyright OpenSearch Contributors
35
* SPDX-License-Identifier: Apache-2.0
@@ -114,6 +116,11 @@ configurations.all {
114116
resolutionStrategy.force "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.9.10"
115117
resolutionStrategy.force "org.jetbrains.kotlin:kotlin-stdlib-common:1.9.10"
116118
}
119+
120+
configurations {
121+
zipArchive
122+
}
123+
117124
compileJava {
118125
options.compilerArgs.addAll(["-processor", 'lombok.launch.AnnotationProcessorHider$AnnotationProcessor'])
119126
}
@@ -162,6 +169,8 @@ dependencies {
162169
testImplementation group: 'org.mockito', name: 'mockito-core', version: "${versions.mockito}"
163170
testImplementation group: 'org.mockito', name: 'mockito-junit-jupiter', version: "${versions.mockito}"
164171
testImplementation 'org.junit.jupiter:junit-jupiter:5.9.3'
172+
173+
zipArchive group: 'org.opensearch.plugin', name:'opensearch-job-scheduler', version: "${opensearch_build}"
165174
}
166175

167176
test {
@@ -276,7 +285,24 @@ afterEvaluate {
276285
}
277286
}
278287

288+
def getJobSchedulerPlugin() {
289+
provider(new Callable<RegularFile>() {
290+
@Override
291+
RegularFile call() throws Exception {
292+
return new RegularFile() {
293+
@Override
294+
File getAsFile() {
295+
return configurations.zipArchive.asFileTree.matching {
296+
include '**/opensearch-job-scheduler*'
297+
}.singleFile
298+
}
299+
}
300+
}
301+
})
302+
}
303+
279304
testClusters.integTest {
305+
plugin(getJobSchedulerPlugin())
280306
plugin(project.tasks.bundlePlugin.archiveFile)
281307
testDistribution = "ARCHIVE"
282308

0 commit comments

Comments
 (0)