forked from elastic/elasticsearch
-
Notifications
You must be signed in to change notification settings - Fork 4
/
elasticsearch.run.gradle
44 lines (39 loc) · 2.06 KB
/
elasticsearch.run.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the "Elastic License
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
* Public License v 1"; you may not use this file except in compliance with, at
* your election, the "Elastic License 2.0", the "GNU Affero General Public
* License v3.0 only", or the "Server Side Public License, v 1".
*/
import org.elasticsearch.gradle.VersionProperties
import org.elasticsearch.gradle.testclusters.RunTask
// gradle has an open issue of failing applying plugins in
// precompiled script plugins (see https://github.com/gradle/gradle/issues/17004)
// apply plugin: 'elasticsearch.internal-testclusters'
testClusters.register("runTask") {
testDistribution = providers.systemProperty('run.distribution').orElse('default').get()
if (providers.systemProperty('run.distribution').getOrElse('default') == 'default') {
String licenseType = providers.systemProperty("run.license_type").getOrElse("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].")
}
// Not enabled by default in the build, otherwise all integration tests will download the databases from our geoip download service:
systemProperty 'ingest.geoip.downloader.enabled.default', 'true'
setting 'xpack.security.enabled', 'true'
keystore 'bootstrap.password', 'password'
user username: 'elastic-admin', password: 'elastic-password', role: '_es_test_root'
numberOfNodes = 1
}
}
tasks.register("run", RunTask) {
useCluster testClusters.named("runTask")
description = 'Runs elasticsearch in the foreground'
group = 'Verification'
impliesSubProjects = true
}