Support configuring license type for gradle run (elastic/x-pack-elasticsearch#3942)
This commit is related to elastic/x-pack-elasticsearch#3877. It allows the passing of a system
property to gradle run indicating whether a `basic` or `trial` license
should be generated. If the `trial` license is indicated, platinum
features will be enabled.
Original commit: elastic/x-pack-elasticsearch@2965e5a4b74f3d5f12fbe87f9a2059c31e11b761
@@ -147,11 +147,18 @@ integTestCluster {
}
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.watcher.enabled', 'true'
setting 'xpack.sql.enabled', 'true'
keystoreSetting 'bootstrap.password', 'password'
}
