Skip to content

Commit 1235716

Browse files
committed
Build: Change gradle run to use zip distribution (#21001)
When running `gradle run`, a developer usually intends to get a running instance as if they had run elasticsearch from the command line. This is different than the isolated environment we use for integration testing plugins. This change switches the run task to use the zip distribution, so that all modules included in the normal distribution are included.
1 parent 3b152fb commit 1235716

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

buildSrc/src/main/groovy/org/elasticsearch/gradle/test/RunTask.groovy

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ public class RunTask extends DefaultTask {
1616
clusterConfig.httpPort = 9200
1717
clusterConfig.transportPort = 9300
1818
clusterConfig.daemonize = false
19+
clusterConfig.distribution = 'zip'
1920
project.afterEvaluate {
2021
ClusterFormationTasks.setup(project, this, clusterConfig)
2122
}

modules/build.gradle

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ subprojects {
2525
// for local ES plugins, the name of the plugin is the same as the directory
2626
name project.name
2727
}
28+
29+
run {
30+
// these cannot be run with the normal distribution, since they are included in it!
31+
distribution = 'integ-test-zip'
32+
}
2833

2934
if (project.file('src/main/packaging').exists()) {
3035
throw new InvalidModelException("Modules cannot contain packaging files")

0 commit comments

Comments
 (0)