Verify distro archives do not contain plain class files (#59073) (#59229)

This is a test to ensure we do not run into a regression like we did in
https://github.com/elastic/elasticsearch/issues/59031
This commit is contained in:
Rene Groeschke 2020-07-08 17:06:36 +02:00 committed by GitHub
parent b27de36b5d
commit 6a7ac3830a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 1 deletions

View File

@ -27,7 +27,7 @@ import org.elasticsearch.gradle.VersionProperties
import org.elasticsearch.gradle.info.BuildParams
import org.elasticsearch.gradle.plugin.PluginBuildPlugin
import org.elasticsearch.gradle.tar.SymbolicLinkPreservingTar
import groovy.io.FileType
import java.nio.file.Files
import java.nio.file.Path
@ -245,6 +245,13 @@ subprojects {
project.delete(archiveExtractionDir)
archiveExtractionDir.mkdirs()
}
// common sanity checks on extracted archive directly as part of checkExtraction
doLast {
// check no plain class files are packaged
archiveExtractionDir.eachFileRecurse (FileType.FILES) { file ->
assert file.name.endsWith(".class") == false
}
}
}
tasks.named('check').configure { dependsOn checkExtraction }
if (project.name.contains('tar')) {