From 3e4f87d4d62b86eabacf392c66d1f9097089b9d1 Mon Sep 17 00:00:00 2001 From: Ryan Ernst Date: Mon, 2 Nov 2015 22:19:29 -0800 Subject: [PATCH] Fix tar issues and build distro dependency for integ tests --- build.gradle | 1 + .../elasticsearch/gradle/test/ClusterFormationTasks.groovy | 3 ++- distribution/build.gradle | 4 +++- distribution/deb/build.gradle | 3 +++ distribution/rpm/build.gradle | 3 +++ distribution/tar/build.gradle | 6 ++++++ distribution/zip/build.gradle | 2 ++ 7 files changed, 20 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index b3e5e09e07a..369bd30cc2f 100644 --- a/build.gradle +++ b/build.gradle @@ -142,6 +142,7 @@ subprojects { substitute module("org.elasticsearch:test-framework:${version}") with project("${projectsPrefix}:test-framework") } substitute module("org.elasticsearch.distribution.zip:elasticsearch:${version}") with project("${projectsPrefix}:distribution:zip") + substitute module("org.elasticsearch.distribution.tar:elasticsearch:${version}") with project("${projectsPrefix}:distribution:tar") } } } diff --git a/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/ClusterFormationTasks.groovy b/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/ClusterFormationTasks.groovy index d90143de931..1f88eb63ee1 100644 --- a/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/ClusterFormationTasks.groovy +++ b/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/ClusterFormationTasks.groovy @@ -228,11 +228,12 @@ class ClusterFormationTasks { static void configureDistributionDependency(Project project, String distro) { String elasticsearchVersion = ElasticsearchProperties.version + String packaging = distro == 'tar' ? 'tgz' : distro project.configurations { elasticsearchDistro } project.dependencies { - elasticsearchDistro "org.elasticsearch.distribution.${distro}:elasticsearch:${elasticsearchVersion}@${distro}" + elasticsearchDistro "org.elasticsearch.distribution.${distro}:elasticsearch:${elasticsearchVersion}@${packaging}" } } } diff --git a/distribution/build.gradle b/distribution/build.gradle index beb07687266..7770c0d98ab 100644 --- a/distribution/build.gradle +++ b/distribution/build.gradle @@ -41,8 +41,10 @@ allprojects { } subprojects { + /***************************************************************************** + * Rest test config * + *****************************************************************************/ apply plugin: 'elasticsearch.rest-test' - integTest { includePackaged true } diff --git a/distribution/deb/build.gradle b/distribution/deb/build.gradle index 7f1cf12d970..24eabe78598 100644 --- a/distribution/deb/build.gradle +++ b/distribution/deb/build.gradle @@ -20,6 +20,9 @@ task buildDeb(type: Deb) { dependsOn dependencyFiles } + artifacts { archives buildDeb } + +integTest.dependsOn buildDeb diff --git a/distribution/rpm/build.gradle b/distribution/rpm/build.gradle index 25af1dee341..04f0c0bda9b 100644 --- a/distribution/rpm/build.gradle +++ b/distribution/rpm/build.gradle @@ -20,6 +20,9 @@ task buildRpm(type: Rpm) { dependsOn dependencyFiles } + artifacts { archives buildRpm } + +integTest.dependsOn buildRpm diff --git a/distribution/tar/build.gradle b/distribution/tar/build.gradle index 8df7ff39534..b49058b3e42 100644 --- a/distribution/tar/build.gradle +++ b/distribution/tar/build.gradle @@ -24,5 +24,11 @@ task buildTar(type: Tar, dependsOn: dependencyFiles) { } artifacts { + 'default' buildTar archives buildTar } + +integTest { + dependsOn buildTar + clusterConfig.distribution = 'tar' +} diff --git a/distribution/zip/build.gradle b/distribution/zip/build.gradle index 98c51c24106..d636e66f152 100644 --- a/distribution/zip/build.gradle +++ b/distribution/zip/build.gradle @@ -27,3 +27,5 @@ artifacts { archives buildZip } +integTest.dependsOn buildZip +