Fix tar issues and build distro dependency for integ tests

This commit is contained in:
Ryan Ernst 2015-11-02 22:19:29 -08:00
parent f5556224f5
commit 3e4f87d4d6
7 changed files with 20 additions and 2 deletions

View File

@ -142,6 +142,7 @@ subprojects {
substitute module("org.elasticsearch:test-framework:${version}") with project("${projectsPrefix}:test-framework") 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.zip:elasticsearch:${version}") with project("${projectsPrefix}:distribution:zip")
substitute module("org.elasticsearch.distribution.tar:elasticsearch:${version}") with project("${projectsPrefix}:distribution:tar")
} }
} }
} }

View File

@ -228,11 +228,12 @@ class ClusterFormationTasks {
static void configureDistributionDependency(Project project, String distro) { static void configureDistributionDependency(Project project, String distro) {
String elasticsearchVersion = ElasticsearchProperties.version String elasticsearchVersion = ElasticsearchProperties.version
String packaging = distro == 'tar' ? 'tgz' : distro
project.configurations { project.configurations {
elasticsearchDistro elasticsearchDistro
} }
project.dependencies { project.dependencies {
elasticsearchDistro "org.elasticsearch.distribution.${distro}:elasticsearch:${elasticsearchVersion}@${distro}" elasticsearchDistro "org.elasticsearch.distribution.${distro}:elasticsearch:${elasticsearchVersion}@${packaging}"
} }
} }
} }

View File

@ -41,8 +41,10 @@ allprojects {
} }
subprojects { subprojects {
/*****************************************************************************
* Rest test config *
*****************************************************************************/
apply plugin: 'elasticsearch.rest-test' apply plugin: 'elasticsearch.rest-test'
integTest { integTest {
includePackaged true includePackaged true
} }

View File

@ -20,6 +20,9 @@
task buildDeb(type: Deb) { task buildDeb(type: Deb) {
dependsOn dependencyFiles dependsOn dependencyFiles
} }
artifacts { artifacts {
archives buildDeb archives buildDeb
} }
integTest.dependsOn buildDeb

View File

@ -20,6 +20,9 @@
task buildRpm(type: Rpm) { task buildRpm(type: Rpm) {
dependsOn dependencyFiles dependsOn dependencyFiles
} }
artifacts { artifacts {
archives buildRpm archives buildRpm
} }
integTest.dependsOn buildRpm

View File

@ -24,5 +24,11 @@ task buildTar(type: Tar, dependsOn: dependencyFiles) {
} }
artifacts { artifacts {
'default' buildTar
archives buildTar archives buildTar
} }
integTest {
dependsOn buildTar
clusterConfig.distribution = 'tar'
}

View File

@ -27,3 +27,5 @@ artifacts {
archives buildZip archives buildZip
} }
integTest.dependsOn buildZip