Skip to content

Commit

Permalink
Build: Remove xpack specific run task (#30487)
Browse files Browse the repository at this point in the history
With the opening of xpack, we still retained a run task within
:x-pack:plugin. However, the root level run task also runs with the
default distribution. This change removes the extra run task inside
xpack in favor of using the root level task, and moves the
license/configuration code for run into the main run configuration.
  • Loading branch information
rjernst authored May 10, 2018
1 parent 34f92df commit bd24cac
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 18 deletions.
16 changes: 16 additions & 0 deletions distribution/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,22 @@ configure(subprojects.findAll { ['archives', 'packages'].contains(it.name) }) {

task run(type: RunTask) {
distribution = System.getProperty('run.distribution', 'zip')
if (distribution == 'zip') {
String licenseType = System.getProperty("license_type", "basic")
if (licenseType == 'trial') {
setting 'xpack.ml.enabled', 'true'
setting 'xpack.graph.enabled', 'true'
setting 'xpack.watcher.enabled', 'true'
setting 'xpack.license.self_generated.type', 'trial'
} else if (licenseType != 'basic') {
throw new IllegalArgumentException("Unsupported self-generated license type: [" + licenseType + "[basic] or [trial].")
}
setting 'xpack.security.enabled', 'true'
setting 'xpack.monitoring.enabled', 'true'
setting 'xpack.sql.enabled', 'true'
setting 'xpack.rollup.enabled', 'true'
keystoreSetting 'bootstrap.password', 'password'
}
}

/**
Expand Down
18 changes: 0 additions & 18 deletions x-pack/plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -158,21 +158,3 @@ integTestCluster {
return tmpFile.exists()
}
}

run {
def licenseType = System.getProperty("license_type", "basic")
if (licenseType == 'trial') {
setting 'xpack.ml.enabled', 'true'
setting 'xpack.graph.enabled', 'true'
setting 'xpack.watcher.enabled', 'true'
setting 'xpack.license.self_generated.type', 'trial'
} else if (licenseType != 'basic') {
throw new IllegalArgumentException("Unsupported self-generated license type: [" + licenseType + "]. Must be " +
"[basic] or [trial].")
}
setting 'xpack.security.enabled', 'true'
setting 'xpack.monitoring.enabled', 'true'
setting 'xpack.sql.enabled', 'true'
setting 'xpack.rollup.enabled', 'true'
keystoreSetting 'bootstrap.password', 'password'
}

0 comments on commit bd24cac

Please sign in to comment.