From a3252af5c0cd66b9150444e4e9251d5e9300f73d Mon Sep 17 00:00:00 2001 From: Rene Groeschke Date: Tue, 6 Oct 2020 15:58:42 +0200 Subject: [PATCH] Cleanup on integtest distribution setup (7.x backport) (#63189) * Cleanup on integtest distribution setup (#62937) - Simplify build task and archive base name calculation - Move integ test zip project only setup into integ test zip build script * Fix merge --- distribution/archives/build.gradle | 43 ------------------- .../archives/integ-test-zip/build.gradle | 31 +++++++++++++ 2 files changed, 31 insertions(+), 43 deletions(-) diff --git a/distribution/archives/build.gradle b/distribution/archives/build.gradle index d5ad11316e6..d6bbf75ff73 100644 --- a/distribution/archives/build.gradle +++ b/distribution/archives/build.gradle @@ -17,8 +17,6 @@ * under the License. */ -import org.apache.tools.ant.taskdefs.condition.Os -import org.elasticsearch.gradle.MavenFilteringHack import java.nio.file.Files import java.nio.file.Path @@ -187,44 +185,3 @@ subprojects { group = "org.elasticsearch.distribution.${name.startsWith("oss-") ? "oss" : "default"}" } - -/***************************************************************************** - * Rest test config * - *****************************************************************************/ -project('integ-test-zip') { - apply plugin: 'elasticsearch.standalone-rest-test' - apply plugin: 'elasticsearch.rest-test' - - group = "org.elasticsearch.distribution.integ-test-zip" - - integTest { - dependsOn assemble - if (Os.isFamily(Os.FAMILY_WINDOWS) && System.getProperty('tests.timeoutSuite') == null) { - // override the suite timeout to 30 mins for windows, because it has the most inefficient filesystem known to man - systemProperty 'tests.timeoutSuite', '1800000!' - } - } - - processTestResources { - inputs.properties(project(':distribution').restTestExpansions) - MavenFilteringHack.filter(it, project(':distribution').restTestExpansions) - } - - // The integ-test-distribution is published to maven - apply plugin: 'elasticsearch.publish' - - // make the pom file name use elasticsearch instead of the project name - archivesBaseName = "elasticsearch${it.name.contains('oss') ? '-oss' : ''}" - - String buildTask = "build${it.name.replaceAll(/-[a-z]/) { it.substring(1).toUpperCase() }.capitalize()}" - ext.buildDist = parent.tasks.named(buildTask) - - publishing { - publications { - nebula { - pom.packaging = 'zip' - artifact(buildDist.flatMap { it.archiveFile }) - } - } - } -} diff --git a/distribution/archives/integ-test-zip/build.gradle b/distribution/archives/integ-test-zip/build.gradle index 1910a1c8c2d..a950d0688fb 100644 --- a/distribution/archives/integ-test-zip/build.gradle +++ b/distribution/archives/integ-test-zip/build.gradle @@ -16,6 +16,37 @@ * specific language governing permissions and limitations * under the License. */ +import org.elasticsearch.gradle.MavenFilteringHack + +apply plugin: 'elasticsearch.standalone-rest-test' +apply plugin: 'elasticsearch.rest-test' + +// The integ-test-distribution is published to maven +apply plugin: 'elasticsearch.publish' + +group = "org.elasticsearch.distribution.integ-test-zip" + +integTest { + dependsOn assemble +} + +processTestResources { + inputs.properties(project(':distribution').restTestExpansions) + MavenFilteringHack.filter(it, project(':distribution').restTestExpansions) +} + +// make the pom file name use elasticsearch instead of the project name +archivesBaseName = "elasticsearch" +ext.buildDist = parent.tasks.named("buildIntegTestZip") + +publishing { + publications { + nebula { + pom.packaging = 'zip' + artifact(buildDist.flatMap { it.archiveFile }) + } + } +} integTest { /*