Remove example-plugins included build (#78408)

This commit is contained in:
Mark Vieira 2021-09-28 14:31:21 -07:00 committed by GitHub
parent 2227a7bce9
commit a9ae3136eb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 6 additions and 21 deletions

View file

@ -102,7 +102,7 @@ public class DistroTestPlugin implements Plugin<Project> {
Map<String, TaskProvider<?>> versionTasks = versionTasks(project, "destructiveDistroUpgradeTest");
TaskProvider<Task> destructiveDistroTest = project.getTasks().register("destructiveDistroTest");
Configuration examplePlugin = configureExamplePlugin(project);
// Configuration examplePlugin = configureExamplePlugin(project);
List<TaskProvider<Test>> windowsTestTasks = new ArrayList<>();
Map<ElasticsearchDistributionType, List<TaskProvider<Test>>> linuxTestTasks = new HashMap<>();
@ -113,12 +113,12 @@ public class DistroTestPlugin implements Plugin<Project> {
String taskname = destructiveDistroTestTaskName(distribution);
TaskProvider<?> depsTask = project.getTasks().register(taskname + "#deps");
// 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);
TaskProvider<Test> destructiveTask = configureTestTask(project, taskname, distribution, t -> {
t.onlyIf(t2 -> distribution.isDocker() == false || dockerSupport.get().getDockerAvailability().isAvailable);
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");
}, depsTask);

View file

@ -369,7 +369,6 @@ tasks.register("branchConsistency") {
}
tasks.named("wrapper").configure {
dependsOn gradle.includedBuild('example-plugins').task(':wrapper')
distributionType = 'ALL'
doLast {
final DistributionLocator locator = new DistributionLocator()
@ -410,13 +409,11 @@ gradle.projectsEvaluated {
tasks.named("precommit") {
dependsOn gradle.includedBuild('build-tools').task(':precommit')
dependsOn gradle.includedBuild('build-tools-internal').task(':precommit')
dependsOn gradle.includedBuild('example-plugins').task(':precommit')
}
tasks.named("checkPart1").configure {
dependsOn gradle.includedBuild('build-tools').task(':check')
dependsOn gradle.includedBuild('build-tools-internal').task(':check')
dependsOn gradle.includedBuild('example-plugins').task(':check')
}
tasks.named("assemble").configure {

View file

@ -6,8 +6,6 @@
* Side Public License, v 1.
*/
includeBuild '../../'
// Include all subdirectories as example projects
rootDir.listFiles().findAll { it.directory && new File(it, 'build.gradle').exists() }.each { subDir ->
include ":${subDir.name}"

View file

@ -9,6 +9,7 @@
package org.elasticsearch.packaging.test;
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.Platforms;
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.assumeTrue;
@AwaitsFix(bugUrl = "Needs to be re-enabled")
public class PluginCliTests extends PackagingTestCase {
private static final String EXAMPLE_PLUGIN_NAME = "custom-settings";
private static final Path EXAMPLE_PLUGIN_ZIP;
static {
// 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

View file

@ -9,22 +9,10 @@ plugins {
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-tools"
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"
List projects = [