Skip to content

Commit

Permalink
Cleanup on integtest distribution setup (7.x backport) (#63189)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
breskeby authored Oct 6, 2020
1 parent 8144106 commit a3252af
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 43 deletions.
43 changes: 0 additions & 43 deletions distribution/archives/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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 })
}
}
}
}
31 changes: 31 additions & 0 deletions distribution/archives/integ-test-zip/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
/*
Expand Down

0 comments on commit a3252af

Please sign in to comment.