Skip to content

Commit d1e7be0

Browse files
committed
Get js and security plugin
Signed-off-by: Craig Perkins <cwperx@amazon.com>
1 parent 30e1482 commit d1e7be0

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

build.gradle

+27
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,9 @@ dependencies {
165165
testImplementation "org.opensearch:opensearch-core:${opensearch_version}"
166166
testRuntimeOnly("org.junit.platform:junit-platform-launcher:1.11.2")
167167
testCompileOnly 'junit:junit:4.13.2'
168+
169+
opensearchPlugin "org.opensearch.plugin:opensearch-job-scheduler:${opensearch_build}@zip"
170+
opensearchPlugin "org.opensearch.plugin:opensearch-security:${opensearch_build}@zip"
168171
}
169172

170173
apply plugin: 'java'
@@ -410,6 +413,26 @@ integTest {
410413
}
411414
}
412415

416+
ext.resolvePluginFile = { pluginId ->
417+
return new Callable<RegularFile>() {
418+
@Override
419+
RegularFile call() throws Exception {
420+
return new RegularFile() {
421+
@Override
422+
File getAsFile() {
423+
return configurations.opensearchPlugin.resolvedConfiguration.resolvedArtifacts
424+
.find { ResolvedArtifact f ->
425+
f.name.startsWith(pluginId)
426+
}
427+
.file
428+
}
429+
}
430+
}
431+
}
432+
}
433+
def jobSchedulerFile = resolvePluginFile("opensearch-job-scheduler")
434+
def securityPluginFile = resolvePluginFile("opensearch-security")
435+
413436
// === Setup security test ===
414437
// This flag indicates the existence of security plugin
415438
def securityEnabled = System.getProperty("security", "false") == "true" || System.getProperty("https", "false") == "true"
@@ -439,6 +462,10 @@ testClusters.integTest {
439462
}
440463
}
441464
}))
465+
plugin(provider(jobSchedulerFile))
466+
if (securityEnabled) {
467+
plugin(provider(securityPluginFile))
468+
}
442469

443470
// As of ES 7.7.0 the opendistro-anomaly-detection plugin is being added to the list of plugins for the testCluster during build before
444471
// the opensearch-job-scheduler plugin, which is causing build failures. From the stack trace, this looks like a bug.

0 commit comments

Comments
 (0)