Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
Expand All @@ -45,6 +46,8 @@ public abstract class RunTask extends DefaultTestClustersTask {

private Boolean apmServerEnabled = false;

private List<String> plugins = List.of();

private Boolean preserveData = false;

private Path dataDir = null;
Expand Down Expand Up @@ -101,6 +104,22 @@ public void setApmServerEnabled(Boolean apmServerEnabled) {
this.apmServerEnabled = apmServerEnabled;
}

@Option(option = "with-plugins", description = "Run distribution with plugins installed")
public void setPlugins(String plugins) {
this.plugins = Arrays.asList(plugins.split(","));
for (var cluster : getClusters()) {
for (String plugin : this.plugins) {
cluster.plugin(":plugins:" + plugin);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

plain FYI. I noticed this is incompatible with Gradle Configuration cache. that's likely not a big deal for using ./gradlew run at the moment, but we will rework or remove cluster.plugin(String) and cluster.module(String) at one point as it breaks configuration compatibility.

}
dependsOn(cluster.getPluginAndModuleConfigurations());
}
}

@Input
public List<String> getPlugins() {
return plugins;
}

@Option(option = "data-dir", description = "Override the base data directory used by the testcluster")
public void setDataDir(String dataDirStr) {
dataDir = Paths.get(dataDirStr).toAbsolutePath();
Expand Down