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
This commit is contained in:
Rene Groeschke 2020-10-06 15:58:42 +02:00 committed by GitHub
parent 8144106ace
commit a3252af5c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 31 additions and 43 deletions

View File

@ -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 })
}
}
}
}

View File

@ -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 {
/*