mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-06-28 17:34:17 -04:00
Remove example-plugins included build (#78408)
This commit is contained in:
parent
2227a7bce9
commit
a9ae3136eb
5 changed files with 6 additions and 21 deletions
|
@ -102,7 +102,7 @@ public class DistroTestPlugin implements Plugin<Project> {
|
||||||
Map<String, TaskProvider<?>> versionTasks = versionTasks(project, "destructiveDistroUpgradeTest");
|
Map<String, TaskProvider<?>> versionTasks = versionTasks(project, "destructiveDistroUpgradeTest");
|
||||||
TaskProvider<Task> destructiveDistroTest = project.getTasks().register("destructiveDistroTest");
|
TaskProvider<Task> destructiveDistroTest = project.getTasks().register("destructiveDistroTest");
|
||||||
|
|
||||||
Configuration examplePlugin = configureExamplePlugin(project);
|
// Configuration examplePlugin = configureExamplePlugin(project);
|
||||||
|
|
||||||
List<TaskProvider<Test>> windowsTestTasks = new ArrayList<>();
|
List<TaskProvider<Test>> windowsTestTasks = new ArrayList<>();
|
||||||
Map<ElasticsearchDistributionType, List<TaskProvider<Test>>> linuxTestTasks = new HashMap<>();
|
Map<ElasticsearchDistributionType, List<TaskProvider<Test>>> linuxTestTasks = new HashMap<>();
|
||||||
|
@ -113,12 +113,12 @@ public class DistroTestPlugin implements Plugin<Project> {
|
||||||
String taskname = destructiveDistroTestTaskName(distribution);
|
String taskname = destructiveDistroTestTaskName(distribution);
|
||||||
TaskProvider<?> depsTask = project.getTasks().register(taskname + "#deps");
|
TaskProvider<?> depsTask = project.getTasks().register(taskname + "#deps");
|
||||||
// explicitly depend on the archive not on the implicit extracted distribution
|
// explicitly depend on the archive not on the implicit extracted distribution
|
||||||
depsTask.configure(t -> t.dependsOn(distribution.getArchiveDependencies(), examplePlugin));
|
depsTask.configure(t -> t.dependsOn(distribution.getArchiveDependencies()));
|
||||||
depsTasks.put(taskname, depsTask);
|
depsTasks.put(taskname, depsTask);
|
||||||
TaskProvider<Test> destructiveTask = configureTestTask(project, taskname, distribution, t -> {
|
TaskProvider<Test> destructiveTask = configureTestTask(project, taskname, distribution, t -> {
|
||||||
t.onlyIf(t2 -> distribution.isDocker() == false || dockerSupport.get().getDockerAvailability().isAvailable);
|
t.onlyIf(t2 -> distribution.isDocker() == false || dockerSupport.get().getDockerAvailability().isAvailable);
|
||||||
addDistributionSysprop(t, DISTRIBUTION_SYSPROP, distribution::getFilepath);
|
addDistributionSysprop(t, DISTRIBUTION_SYSPROP, distribution::getFilepath);
|
||||||
addDistributionSysprop(t, EXAMPLE_PLUGIN_SYSPROP, () -> examplePlugin.getSingleFile().toString());
|
//addDistributionSysprop(t, EXAMPLE_PLUGIN_SYSPROP, () -> examplePlugin.getSingleFile().toString());
|
||||||
t.exclude("**/PackageUpgradeTests.class");
|
t.exclude("**/PackageUpgradeTests.class");
|
||||||
}, depsTask);
|
}, depsTask);
|
||||||
|
|
||||||
|
|
|
@ -369,7 +369,6 @@ tasks.register("branchConsistency") {
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.named("wrapper").configure {
|
tasks.named("wrapper").configure {
|
||||||
dependsOn gradle.includedBuild('example-plugins').task(':wrapper')
|
|
||||||
distributionType = 'ALL'
|
distributionType = 'ALL'
|
||||||
doLast {
|
doLast {
|
||||||
final DistributionLocator locator = new DistributionLocator()
|
final DistributionLocator locator = new DistributionLocator()
|
||||||
|
@ -410,13 +409,11 @@ gradle.projectsEvaluated {
|
||||||
tasks.named("precommit") {
|
tasks.named("precommit") {
|
||||||
dependsOn gradle.includedBuild('build-tools').task(':precommit')
|
dependsOn gradle.includedBuild('build-tools').task(':precommit')
|
||||||
dependsOn gradle.includedBuild('build-tools-internal').task(':precommit')
|
dependsOn gradle.includedBuild('build-tools-internal').task(':precommit')
|
||||||
dependsOn gradle.includedBuild('example-plugins').task(':precommit')
|
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.named("checkPart1").configure {
|
tasks.named("checkPart1").configure {
|
||||||
dependsOn gradle.includedBuild('build-tools').task(':check')
|
dependsOn gradle.includedBuild('build-tools').task(':check')
|
||||||
dependsOn gradle.includedBuild('build-tools-internal').task(':check')
|
dependsOn gradle.includedBuild('build-tools-internal').task(':check')
|
||||||
dependsOn gradle.includedBuild('example-plugins').task(':check')
|
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.named("assemble").configure {
|
tasks.named("assemble").configure {
|
||||||
|
|
|
@ -6,8 +6,6 @@
|
||||||
* Side Public License, v 1.
|
* Side Public License, v 1.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
includeBuild '../../'
|
|
||||||
|
|
||||||
// Include all subdirectories as example projects
|
// Include all subdirectories as example projects
|
||||||
rootDir.listFiles().findAll { it.directory && new File(it, 'build.gradle').exists() }.each { subDir ->
|
rootDir.listFiles().findAll { it.directory && new File(it, 'build.gradle').exists() }.each { subDir ->
|
||||||
include ":${subDir.name}"
|
include ":${subDir.name}"
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
package org.elasticsearch.packaging.test;
|
package org.elasticsearch.packaging.test;
|
||||||
|
|
||||||
import org.apache.http.client.fluent.Request;
|
import org.apache.http.client.fluent.Request;
|
||||||
|
import org.elasticsearch.packaging.test.PackagingTestCase.AwaitsFix;
|
||||||
import org.elasticsearch.packaging.util.Installation;
|
import org.elasticsearch.packaging.util.Installation;
|
||||||
import org.elasticsearch.packaging.util.Platforms;
|
import org.elasticsearch.packaging.util.Platforms;
|
||||||
import org.elasticsearch.packaging.util.Shell;
|
import org.elasticsearch.packaging.util.Shell;
|
||||||
|
@ -24,13 +25,14 @@ import static org.hamcrest.Matchers.equalTo;
|
||||||
import static org.junit.Assume.assumeFalse;
|
import static org.junit.Assume.assumeFalse;
|
||||||
import static org.junit.Assume.assumeTrue;
|
import static org.junit.Assume.assumeTrue;
|
||||||
|
|
||||||
|
@AwaitsFix(bugUrl = "Needs to be re-enabled")
|
||||||
public class PluginCliTests extends PackagingTestCase {
|
public class PluginCliTests extends PackagingTestCase {
|
||||||
|
|
||||||
private static final String EXAMPLE_PLUGIN_NAME = "custom-settings";
|
private static final String EXAMPLE_PLUGIN_NAME = "custom-settings";
|
||||||
private static final Path EXAMPLE_PLUGIN_ZIP;
|
private static final Path EXAMPLE_PLUGIN_ZIP;
|
||||||
static {
|
static {
|
||||||
// re-read before each test so the plugin path can be manipulated within tests
|
// re-read before each test so the plugin path can be manipulated within tests
|
||||||
EXAMPLE_PLUGIN_ZIP = Paths.get(System.getProperty("tests.example-plugin"));
|
EXAMPLE_PLUGIN_ZIP = Paths.get(System.getProperty("tests.example-plugin", "/dummy/path"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
|
|
|
@ -9,22 +9,10 @@ plugins {
|
||||||
id "com.gradle.enterprise" version "3.6.4"
|
id "com.gradle.enterprise" version "3.6.4"
|
||||||
}
|
}
|
||||||
|
|
||||||
def isEclipse = providers.systemProperty("eclipse.launcher").forUseAtConfigurationTime().isPresent() || // Detects gradle launched from Eclipse's IDE
|
|
||||||
providers.systemProperty("eclipse.application").forUseAtConfigurationTime().isPresent() || // Detects gradle launched from the Eclipse compiler server
|
|
||||||
gradle.startParameter.taskNames.contains('eclipse') || // Detects gradle launched from the command line to do eclipse stuff
|
|
||||||
gradle.startParameter.taskNames.contains('cleanEclipse')
|
|
||||||
|
|
||||||
includeBuild "build-conventions"
|
includeBuild "build-conventions"
|
||||||
includeBuild "build-tools"
|
includeBuild "build-tools"
|
||||||
includeBuild "build-tools-internal"
|
includeBuild "build-tools-internal"
|
||||||
|
|
||||||
// Eclipse will hang on import when examples are included in the composite build so omit them
|
|
||||||
if (isEclipse == false) {
|
|
||||||
includeBuild("plugins/examples") {
|
|
||||||
name = "example-plugins"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
rootProject.name = "elasticsearch"
|
rootProject.name = "elasticsearch"
|
||||||
|
|
||||||
List projects = [
|
List projects = [
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue