stable filemode for zip distributions (#30854)

Applies default file and directory permissions to zip distributions
similar to how they're set for the tar distributions. Previously zip
distributions would retain permissions they had on the build host's
working tree, which could vary depending on its umask

For #30799
This commit is contained in:
Andy Bristol 2018-05-29 17:32:06 -07:00 committed by GitHub
parent eb2e43b695
commit 116d08303e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 0 deletions

View File

@ -106,15 +106,23 @@ tasks.withType(AbstractArchiveTask) {
baseName = "elasticsearch${ subdir.contains('oss') ? '-oss' : ''}"
}
Closure commonZipConfig = {
dirMode 0755
fileMode 0644
}
task buildIntegTestZip(type: Zip) {
configure(commonZipConfig)
with archiveFiles(transportModulesFiles, 'zip', false)
}
task buildZip(type: Zip) {
configure(commonZipConfig)
with archiveFiles(modulesFiles(false), 'zip', false)
}
task buildOssZip(type: Zip) {
configure(commonZipConfig)
with archiveFiles(modulesFiles(true), 'zip', true)
}