-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
52 lines (42 loc) · 1.73 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
apply plugin: 'nebula.ospackage'
buildscript {
// Repositories from which this build.gradle will get it's dependencies.
repositories {
jcenter()
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath 'com.netflix.nebula:gradle-ospackage-plugin:4.3.0'
}
}
// Nebula plugin which enable the debian package to be built.
apply plugin: 'nebula.ospackage'
// build directory for gradlew
project.buildDir = 'build/'
// Main gradle taske that builds the artifact.
// Launched by running: ./gradlew buildDeb or ./gradlew buildRpm
// Docs can be found: https://github.com/nebula-plugins/gradle-ospackage-plugin/wiki/Deb-Plugin
ospackage {
// Jenkin's provided env variables
def buildNumber = System.getenv("BUILD_NUMBER") ?: "0"
def branchName = System.getenv("BRANCH_NAME")?.replaceAll("/", "-") ?: "dev"
// this will create a file in build/distributions
// that looks like <packageName>_<version>_<release>_<arch>.deb
packageName = System.getenv("PACKAGE_NAME") ?: "armory-bootstrap-app"
version = "0.${buildNumber}.0"
release = "h${buildNumber}.${branchName}"
user = 'root'
permissionGroup = 'root'
arch = "NOARCH"
// Prerequisite package requirements, which will be installed before this app.deb gets installed
requires('curl')
// where to drop the configuration, artifacts which are created as part of the build
// - from field: where to find files afer /bin/build.sh has finished running
// - into field: where files will be installed onto the machine
from('src/nginx.conf') {
into '/etc/nginx/nginx.conf'
}
// A script you can run (as root) thats required for your application.
// Log directory creation/permissions, etc.
postInstall file('src/debian/post-install.sh')
}