Merge remote-tracking branch 'upstream/master'
Original commit: elastic/x-pack-elasticsearch@7f3f3ce66a
This commit is contained in:
commit
d6f0b59e7a
|
@ -224,7 +224,7 @@ task createNodeKeyStore(type: LoggedExec) {
|
|||
delete nodeKeystore
|
||||
}
|
||||
}
|
||||
executable = new File(project.javaHome, 'bin/keytool')
|
||||
executable = new File(project.runtimeJavaHome, 'bin/keytool')
|
||||
standardInput = new ByteArrayInputStream('FirstName LastName\nUnit\nOrganization\nCity\nState\nNL\nyes\n\n'.getBytes('UTF-8'))
|
||||
args '-genkey',
|
||||
'-alias', 'test-node',
|
||||
|
|
|
@ -186,25 +186,31 @@ subprojects {
|
|||
task buildBwcVersion(type: Exec) {
|
||||
dependsOn checkoutXPackBwcBranch, checkoutElasticsearchBwcBranch, writeElasticsearchBuildMetadata, writeXPackBuildMetadata
|
||||
workingDir = xpackCheckoutDir
|
||||
if (project.rootProject.ext.runtimeJavaVersion == JavaVersion.VERSION_1_8 && ["5.6", "6.0", "6.1"].contains(bwcBranch)) {
|
||||
/*
|
||||
* If runtime Java home is set to JDK 8 and we are building branches that are officially built with JDK 8, push this to JAVA_HOME for
|
||||
* these builds.
|
||||
*/
|
||||
environment('JAVA_HOME', System.getenv('RUNTIME_JAVA_HOME'))
|
||||
}
|
||||
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
|
||||
executable 'cmd'
|
||||
args '/C', 'call', new File(xpackCheckoutDir, 'gradlew').toString()
|
||||
} else {
|
||||
executable = new File(xpackCheckoutDir, 'gradlew').toString()
|
||||
executable new File(xpackCheckoutDir, 'gradlew').toString()
|
||||
}
|
||||
final ArrayList<String> commandLineArgs = [":x-pack-elasticsearch:plugin:assemble", "-Dbuild.snapshot=${System.getProperty('build.snapshot') ?: 'true'}"]
|
||||
args ":x-pack-elasticsearch:plugin:assemble", "-Dbuild.snapshot=${System.getProperty('build.snapshot') ?: 'true'}"
|
||||
final LogLevel logLevel = gradle.startParameter.logLevel
|
||||
if ([LogLevel.QUIET, LogLevel.WARN, LogLevel.INFO, LogLevel.DEBUG].contains(logLevel)) {
|
||||
commandLineArgs << "--${logLevel.name().toLowerCase(Locale.ENGLISH)}"
|
||||
args "--${logLevel.name().toLowerCase(Locale.ENGLISH)}"
|
||||
}
|
||||
final String showStacktraceName = gradle.startParameter.showStacktrace.name()
|
||||
assert ["INTERNAL_EXCEPTIONS", "ALWAYS", "ALWAYS_FULL"].contains(showStacktraceName)
|
||||
if (showStacktraceName.equals("ALWAYS")) {
|
||||
commandLineArgs << "--stacktrace"
|
||||
args "--stacktrace"
|
||||
} else if (showStacktraceName.equals("ALWAYS_FULL")) {
|
||||
commandLineArgs << "--full-stacktrace"
|
||||
args "--full-stacktrace"
|
||||
}
|
||||
args commandLineArgs
|
||||
}
|
||||
|
||||
artifacts {
|
||||
|
|
|
@ -42,7 +42,7 @@ task createNodeKeyStore(type: LoggedExec) {
|
|||
delete nodeKeystore
|
||||
}
|
||||
}
|
||||
executable = new File(project.javaHome, 'bin/keytool')
|
||||
executable = new File(project.runtimeJavaHome, 'bin/keytool')
|
||||
standardInput = new ByteArrayInputStream('FirstName LastName\nUnit\nOrganization\nCity\nState\nNL\nyes\n\n'.getBytes('UTF-8'))
|
||||
args '-genkey',
|
||||
'-alias', 'test-node',
|
||||
|
@ -67,7 +67,7 @@ task createClientKeyStore(type: LoggedExec) {
|
|||
delete clientKeyStore
|
||||
}
|
||||
}
|
||||
executable = new File(project.javaHome, 'bin/keytool')
|
||||
executable = new File(project.runtimeJavaHome, 'bin/keytool')
|
||||
standardInput = new ByteArrayInputStream('FirstName LastName\nUnit\nOrganization\nCity\nState\nNL\nyes\n\n'.getBytes('UTF-8'))
|
||||
args '-genkey',
|
||||
'-alias', 'test-client',
|
||||
|
@ -92,7 +92,7 @@ task exportNodeCertificate(type: LoggedExec) {
|
|||
delete nodeCertificate
|
||||
}
|
||||
}
|
||||
executable = new File(project.javaHome, 'bin/keytool')
|
||||
executable = new File(project.runtimeJavaHome, 'bin/keytool')
|
||||
args '-export',
|
||||
'-alias', 'test-node',
|
||||
'-keystore', nodeKeystore,
|
||||
|
@ -103,7 +103,7 @@ task exportNodeCertificate(type: LoggedExec) {
|
|||
// Import the node certificate in the client's keystore
|
||||
task importNodeCertificateInClientKeyStore(type: LoggedExec) {
|
||||
dependsOn exportNodeCertificate
|
||||
executable = new File(project.javaHome, 'bin/keytool')
|
||||
executable = new File(project.runtimeJavaHome, 'bin/keytool')
|
||||
args '-import',
|
||||
'-alias', 'test-node',
|
||||
'-keystore', clientKeyStore,
|
||||
|
@ -123,7 +123,7 @@ task exportClientCertificate(type: LoggedExec) {
|
|||
delete clientCertificate
|
||||
}
|
||||
}
|
||||
executable = new File(project.javaHome, 'bin/keytool')
|
||||
executable = new File(project.runtimeJavaHome, 'bin/keytool')
|
||||
args '-export',
|
||||
'-alias', 'test-client',
|
||||
'-keystore', clientKeyStore,
|
||||
|
@ -134,7 +134,7 @@ task exportClientCertificate(type: LoggedExec) {
|
|||
// Import the client certificate in the node's keystore
|
||||
task importClientCertificateInNodeKeyStore(type: LoggedExec) {
|
||||
dependsOn exportClientCertificate
|
||||
executable = new File(project.javaHome, 'bin/keytool')
|
||||
executable = new File(project.runtimeJavaHome, 'bin/keytool')
|
||||
args '-import',
|
||||
'-alias', 'test-client',
|
||||
'-keystore', nodeKeystore,
|
||||
|
|
Loading…
Reference in New Issue