2019-11-01 14:33:11 -04:00
|
|
|
import org.elasticsearch.gradle.info.BuildParams
|
|
|
|
|
2018-01-20 00:30:17 -05:00
|
|
|
apply plugin: 'elasticsearch.esplugin'
|
[7.x] Convert second 1/2 x-pack plugins from integTest to [yaml | java]RestTest or internalClusterTest (#61802) (#61856)
For 1/2 the plugins in x-pack, the integTest
task is now a no-op and all of the tests are now executed via a test,
yamlRestTest, javaRestTest, or internalClusterTest.
This includes the following projects:
security, spatial, stack, transform, vecotrs, voting-only-node, and watcher.
A few of the more specialized qa projects within these plugins
have not been changed with this PR due to additional complexity which should
be addressed separately.
related: #60630
related: #56841
related: #59939
related: #55896
2020-09-02 12:20:55 -04:00
|
|
|
apply plugin: 'elasticsearch.internal-cluster-test'
|
2018-01-20 00:30:17 -05:00
|
|
|
esplugin {
|
|
|
|
name 'x-pack-watcher'
|
|
|
|
description 'Elasticsearch Expanded Pack Plugin - Watcher'
|
|
|
|
classname 'org.elasticsearch.xpack.watcher.Watcher'
|
2018-01-21 11:00:51 -05:00
|
|
|
hasNativeController false
|
2018-01-25 08:33:30 -05:00
|
|
|
requiresKeystore false
|
2018-01-20 00:30:17 -05:00
|
|
|
extendedPlugins = ['x-pack-core']
|
|
|
|
}
|
2017-12-08 11:41:32 -05:00
|
|
|
|
|
|
|
archivesBaseName = 'x-pack-watcher'
|
|
|
|
|
2018-01-20 00:30:17 -05:00
|
|
|
ext.compactProfile = 'full'
|
|
|
|
|
2019-04-05 02:01:56 -04:00
|
|
|
compileJava.options.compilerArgs << "-Xlint:-rawtypes,-unchecked"
|
|
|
|
compileTestJava.options.compilerArgs << "-Xlint:-rawtypes,-unchecked"
|
2018-01-20 00:30:17 -05:00
|
|
|
|
2020-06-18 02:15:50 -04:00
|
|
|
tasks.named("dependencyLicenses").configure {
|
2019-11-14 06:01:23 -05:00
|
|
|
mapping from: /owasp-java-html-sanitizer.*/, to: 'owasp-java-html-sanitizer'
|
2017-12-08 11:41:32 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2019-11-14 06:01:23 -05:00
|
|
|
compileOnly project(':server')
|
|
|
|
compileOnly project(path: xpackModule('core'), configuration: 'default')
|
2020-06-30 09:57:41 -04:00
|
|
|
compileOnly project(path: ':modules:transport-netty4')
|
|
|
|
compileOnly project(path: ':plugins:transport-nio')
|
2019-11-14 06:01:23 -05:00
|
|
|
|
2020-06-14 16:30:44 -04:00
|
|
|
testImplementation project(path: xpackModule('core'), configuration: 'testArtifacts')
|
|
|
|
testImplementation project(xpackModule('ilm'))
|
2019-11-14 06:01:23 -05:00
|
|
|
|
|
|
|
// watcher deps
|
2020-06-30 09:57:41 -04:00
|
|
|
api 'com.googlecode.owasp-java-html-sanitizer:owasp-java-html-sanitizer:20191001.1'
|
2020-04-08 02:20:17 -04:00
|
|
|
runtimeOnly 'com.google.guava:guava:27.1-jre' // needed by watcher for the html sanitizer
|
|
|
|
runtimeOnly 'com.google.guava:failureaccess:1.0.1'
|
2020-06-30 09:57:41 -04:00
|
|
|
api 'com.sun.mail:jakarta.mail:1.6.4'
|
|
|
|
api 'com.sun.activation:jakarta.activation:1.2.1'
|
2019-11-14 06:01:23 -05:00
|
|
|
compileOnly "org.apache.httpcomponents:httpclient:${versions.httpclient}"
|
|
|
|
compileOnly "org.apache.httpcomponents:httpcore:${versions.httpcore}"
|
|
|
|
|
2020-06-14 16:30:44 -04:00
|
|
|
testImplementation 'org.subethamail:subethasmtp:3.1.7'
|
2019-11-14 06:01:23 -05:00
|
|
|
// needed for subethasmtp, has @GuardedBy annotation
|
2020-06-14 16:30:44 -04:00
|
|
|
testImplementation 'com.google.code.findbugs:jsr305:3.0.2'
|
2017-12-08 11:41:32 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
// classes are missing, e.g. com.ibm.icu.lang.UCharacter
|
2019-11-14 06:01:23 -05:00
|
|
|
thirdPartyAudit {
|
|
|
|
ignoreViolations(
|
|
|
|
// uses internal java api: sun.misc.Unsafe
|
|
|
|
'com.google.common.cache.Striped64',
|
|
|
|
'com.google.common.cache.Striped64$1',
|
|
|
|
'com.google.common.cache.Striped64$Cell',
|
2020-01-17 12:00:33 -05:00
|
|
|
'com.google.common.hash.LittleEndianByteArray$UnsafeByteArray',
|
|
|
|
'com.google.common.hash.LittleEndianByteArray$UnsafeByteArray$1',
|
|
|
|
'com.google.common.hash.LittleEndianByteArray$UnsafeByteArray$2',
|
|
|
|
'com.google.common.hash.LittleEndianByteArray$UnsafeByteArray$3',
|
|
|
|
'com.google.common.hash.Striped64',
|
|
|
|
'com.google.common.hash.Striped64$1',
|
|
|
|
'com.google.common.hash.Striped64$Cell',
|
2019-11-14 06:01:23 -05:00
|
|
|
'com.google.common.primitives.UnsignedBytes$LexicographicalComparatorHolder$UnsafeComparator',
|
2020-01-17 12:00:33 -05:00
|
|
|
'com.google.common.primitives.UnsignedBytes$LexicographicalComparatorHolder$UnsafeComparator$1',
|
|
|
|
'com.google.common.util.concurrent.AbstractFuture$UnsafeAtomicHelper',
|
|
|
|
'com.google.common.util.concurrent.AbstractFuture$UnsafeAtomicHelper$1'
|
2019-11-14 06:01:23 -05:00
|
|
|
)
|
|
|
|
|
|
|
|
ignoreViolations(
|
|
|
|
'com.sun.activation.registries.LineTokenizer',
|
|
|
|
'com.sun.activation.registries.LogSupport',
|
|
|
|
'com.sun.activation.registries.MailcapFile',
|
|
|
|
'com.sun.activation.registries.MailcapTokenizer',
|
|
|
|
'com.sun.activation.registries.MimeTypeEntry',
|
|
|
|
'com.sun.activation.registries.MimeTypeFile',
|
|
|
|
'javax.activation.MailcapCommandMap',
|
|
|
|
'javax.activation.MimetypesFileTypeMap'
|
|
|
|
)
|
|
|
|
}
|
2019-01-07 10:24:19 -05:00
|
|
|
|
2019-11-14 06:01:23 -05:00
|
|
|
forbiddenPatterns {
|
|
|
|
exclude '**/*.p12'
|
|
|
|
}
|
|
|
|
|
|
|
|
// pulled in as external dependency to work on java 9
|
2020-03-23 18:30:10 -04:00
|
|
|
if (BuildParams.runtimeJavaVersion <= JavaVersion.VERSION_1_8) {
|
|
|
|
thirdPartyAudit.ignoreJarHellWithJDK(
|
|
|
|
// pulled in as external dependency to work on java 9
|
|
|
|
'com.sun.activation.registries.LineTokenizer',
|
|
|
|
'com.sun.activation.registries.LogSupport',
|
|
|
|
'com.sun.activation.registries.MailcapFile',
|
|
|
|
'com.sun.activation.registries.MailcapTokenizer',
|
|
|
|
'com.sun.activation.registries.MimeTypeEntry',
|
|
|
|
'com.sun.activation.registries.MimeTypeFile',
|
|
|
|
'javax.activation.MailcapCommandMap',
|
|
|
|
'javax.activation.MimetypesFileTypeMap',
|
|
|
|
|
|
|
|
'com.sun.activation.registries.MailcapParseException',
|
|
|
|
'javax.activation.ActivationDataFlavor',
|
|
|
|
'javax.activation.CommandInfo',
|
|
|
|
'javax.activation.CommandMap',
|
|
|
|
'javax.activation.CommandObject',
|
|
|
|
'javax.activation.DataContentHandler',
|
|
|
|
'javax.activation.DataContentHandlerFactory',
|
|
|
|
'javax.activation.DataHandler$1',
|
|
|
|
'javax.activation.DataHandler',
|
|
|
|
'javax.activation.DataHandlerDataSource',
|
|
|
|
'javax.activation.DataSource',
|
|
|
|
'javax.activation.DataSourceDataContentHandler',
|
|
|
|
'javax.activation.FileDataSource',
|
|
|
|
'javax.activation.FileTypeMap',
|
|
|
|
'javax.activation.MimeType',
|
|
|
|
'javax.activation.MimeTypeParameterList',
|
|
|
|
'javax.activation.MimeTypeParseException',
|
|
|
|
'javax.activation.ObjectDataContentHandler',
|
|
|
|
'javax.activation.SecuritySupport$1',
|
|
|
|
'javax.activation.SecuritySupport$2',
|
|
|
|
'javax.activation.SecuritySupport$3',
|
|
|
|
'javax.activation.SecuritySupport$4',
|
|
|
|
'javax.activation.SecuritySupport$5',
|
|
|
|
'javax.activation.SecuritySupport',
|
|
|
|
'javax.activation.URLDataSource',
|
|
|
|
'javax.activation.UnsupportedDataTypeException'
|
|
|
|
)
|
2017-12-08 11:41:32 -05:00
|
|
|
}
|
2018-01-20 00:30:17 -05:00
|
|
|
|
[7.x] Convert second 1/2 x-pack plugins from integTest to [yaml | java]RestTest or internalClusterTest (#61802) (#61856)
For 1/2 the plugins in x-pack, the integTest
task is now a no-op and all of the tests are now executed via a test,
yamlRestTest, javaRestTest, or internalClusterTest.
This includes the following projects:
security, spatial, stack, transform, vecotrs, voting-only-node, and watcher.
A few of the more specialized qa projects within these plugins
have not been changed with this PR due to additional complexity which should
be addressed separately.
related: #60630
related: #56841
related: #59939
related: #55896
2020-09-02 12:20:55 -04:00
|
|
|
internalClusterTest {
|
2019-11-14 06:01:23 -05:00
|
|
|
/*
|
|
|
|
* We have to disable setting the number of available processors as tests in the same JVM randomize processors and will step on each
|
|
|
|
* other if we allow them to set the number of available processors as it's set-once in Netty.
|
|
|
|
*/
|
|
|
|
systemProperty 'es.set.netty.runtime.available.processors', 'false'
|
2018-01-20 00:30:17 -05:00
|
|
|
}
|
|
|
|
|
2020-02-26 16:57:10 -05:00
|
|
|
// add all sub-projects of the qa sub-project
|
|
|
|
gradle.projectsEvaluated {
|
|
|
|
project.subprojects
|
|
|
|
.find { it.path == project.path + ":qa" }
|
|
|
|
.subprojects
|
|
|
|
.findAll { it.path.startsWith(project.path + ":qa") }
|
|
|
|
.each { check.dependsOn it.check }
|
|
|
|
}
|