Build: Remove xpack specific run task (#30487)
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.
This commit is contained in:
parent
34f92df2d3
commit
bd24caccaf
|
@ -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'
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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'
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue