Merge pull request #20134 from rjernst/plugin_run_config
Build: Allow plugin to set run configuration distro to zip
This commit is contained in:
commit
acbece5b55
|
@ -72,10 +72,9 @@ class ClusterFormationTasks {
|
|||
throw new GradleException("bwcVersion must not be null if numBwcNodes is > 0")
|
||||
}
|
||||
// this is our current version distribution configuration we use for all kinds of REST tests etc.
|
||||
project.configurations {
|
||||
elasticsearchDistro
|
||||
}
|
||||
configureDistributionDependency(project, config.distribution, project.configurations.elasticsearchDistro, VersionProperties.elasticsearch)
|
||||
String distroConfigName = "${task.name}_elasticsearchDistro"
|
||||
Configuration distro = project.configurations.create(distroConfigName)
|
||||
configureDistributionDependency(project, config.distribution, distro, VersionProperties.elasticsearch)
|
||||
if (config.bwcVersion != null && config.numBwcNodes > 0) {
|
||||
// if we have a cluster that has a BWC cluster we also need to configure a dependency on the BWC version
|
||||
// this version uses the same distribution etc. and only differs in the version we depend on.
|
||||
|
@ -91,10 +90,9 @@ class ClusterFormationTasks {
|
|||
// we start N nodes and out of these N nodes there might be M bwc nodes.
|
||||
// for each of those nodes we might have a different configuratioon
|
||||
String elasticsearchVersion = VersionProperties.elasticsearch
|
||||
Configuration configuration = project.configurations.elasticsearchDistro
|
||||
if (i < config.numBwcNodes) {
|
||||
elasticsearchVersion = config.bwcVersion
|
||||
configuration = project.configurations.elasticsearchBwcDistro
|
||||
distro = project.configurations.elasticsearchBwcDistro
|
||||
}
|
||||
NodeInfo node = new NodeInfo(config, i, project, task, elasticsearchVersion, sharedDir)
|
||||
if (i == 0) {
|
||||
|
@ -105,7 +103,7 @@ class ClusterFormationTasks {
|
|||
config.seedNodePortsFile = node.transportPortsFile;
|
||||
}
|
||||
nodes.add(node)
|
||||
startTasks.add(configureNode(project, task, cleanup, node, configuration))
|
||||
startTasks.add(configureNode(project, task, cleanup, node, distro))
|
||||
}
|
||||
|
||||
Task wait = configureWaitTask("${task.name}#wait", project, nodes, startTasks)
|
||||
|
|
Loading…
Reference in New Issue