SOLR-14847: Create Solr Server TGZ (#1844)

Create new targets for building solr binary release artifacts:

gradlew -p solr/packaging distTar distZip

Co-authored-by: Houston Putman <houston@apache.org>
Co-authored-by: Dawid Weiss <dawid.weiss@carrotsearch.com>
Co-authored-by: Mike Drob <mdrob@apache.org>
This commit is contained in:
Mike Drob 2020-09-10 10:55:48 -05:00 committed by GitHub
parent 59d83428bc
commit 14e4edc1e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 58 additions and 38 deletions

View File

@ -29,7 +29,8 @@ ls -R build/maven-local/
Put together Solr distribution:
gradlew -p solr/packaging assemble
ls solr/packaging/build/solr-*
ls solr/packaging/build/distributions/solr-* # release archives
ls solr/packaging/build/solr-* # expanded directory
Other validation and checks

View File

@ -20,6 +20,7 @@
plugins {
id 'base'
id 'distribution'
}
description = 'Solr packaging'
@ -64,7 +65,22 @@ dependencies {
server project(path: ":solr:server", configuration: "packaging")
}
task toDir(type: Sync) {
distributions {
main {
distributionBaseName = 'solr'
contents {
// Manually correct posix permissions (matters when packaging on Windows).
filesMatching([
"**/*.sh",
"**/bin/post",
"**/bin/postlogs",
"**/bin/solr",
"**/bin/init.d/solr",
"**/bin/solr-exporter",
]) {
setMode 0755
}
from(project(":solr").projectDir, {
include "bin/**"
include "licenses/**"
@ -101,21 +117,24 @@ task toDir(type: Sync) {
})
// docs/ - TODO: this is assembled via XSLT... leaving out for now.
into distDir
doLast {
logger.lifecycle "Solr distribution assembled under: ${distDir}"
}
}
}
distTar {
compression = Compression.GZIP
}
installDist {
into distDir
}
task dev(type: Copy) {
description "Assemble Solr distribution into 'development' folder at ${devDir}"
group "build"
from toDir.outputs
from installDist.outputs
into devDir
}
assemble.dependsOn toDir
assemble.dependsOn installDist