diff --git a/sample-extension-plugin/build.gradle b/sample-extension-plugin/build.gradle index 90c516b2..40d54585 100644 --- a/sample-extension-plugin/build.gradle +++ b/sample-extension-plugin/build.gradle @@ -6,7 +6,6 @@ apply plugin: 'opensearch.opensearchplugin' apply plugin: 'opensearch.testclusters' apply plugin: 'opensearch.java-rest-test' -apply plugin: 'opensearch.pluginzip' import org.opensearch.gradle.test.RestIntegTestTask import org.opensearch.gradle.testclusters.StandaloneRestIntegTestTask @@ -126,7 +125,6 @@ testClusters.integTest { debugPort += 1 } } - setting 'path.repo', repo.absolutePath } @@ -296,3 +294,19 @@ run { } useCluster testClusters.integTest } + +// As of ES 7.7 the sample-extension-plugin is being added to the list of plugins for the testCluster during build before +// the job-scheduler plugin is causing build failures. +// The job-scheduler zip is added explicitly above but the sample-extension-plugin is added implicitly at some time during evaluation. +// Will need to do a deep dive to find out exactly what task adds the sample-extension-plugin and add job-scheduler there but a temporary hack is to +// reorder the plugins list after evaluation but prior to task execution when the plugins are installed. +afterEvaluate { + testClusters.javaRestTest.nodes.each { node -> + def nodePlugins = node.plugins + def firstPlugin = nodePlugins.get(0) + if (firstPlugin.provider == project.bundlePlugin.archiveFile) { + nodePlugins.remove(0) + nodePlugins.add(firstPlugin) + } + } +}