Skip to content

Instantly share code, notes, and snippets.

@nicknezis
Created February 16, 2017 08:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nicknezis/cf7a03ead2737d56a91f4039ea3b9c75 to your computer and use it in GitHub Desktop.
Save nicknezis/cf7a03ead2737d56a91f4039ea3b9c75 to your computer and use it in GitHub Desktop.
apply plugin: "nebula.ospackage"
apply plugin: "maven"
configurations {
moduleArchives
serviceArchives
}
dependencies {
moduleArchives project(path: ":modules:Base", configuration: "archives")
moduleArchives project(path: ":modules:Extras", configuration: "archives")
serviceArchives project(path: ":services:Nifi", configuration: "archives")
serviceArchives project(path: ":services:Zookeeper", configuration: "archives")
}
task prepare(type: Copy) {
into "$buildDir/test"
from configurations.moduleArchives
}
task makePlaybook(type: Copy) {
dependsOn prepare
from 'src/templates'
into "$buildDir"
include 'playbook.yml.template'
rename { file -> 'playbook.yml' }
expand(dependencies: fileTree(dir: "$buildDir/test"))
}
buildRpm {
dependsOn configurations.serviceArchives, configurations.moduleArchives
packageName rootProject.name
version project.version.toString().replaceAll("-", "_")
release "1"
into("/c2/install.d") {
from {
configurations.moduleArchives.collect { tarTree(it) }
}
addParentDirs = false
createDirectoryEntry = true
}
}
artifacts {
archives buildRpm
}
Hello:<% dependencies.each { File file -> %>
- $file<% } %><% dependencies.each { File file -> %>
- $file<% } %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment