forked from spinnaker/spinnaker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
111 lines (89 loc) · 2.4 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
buildscript {
ext {
springBootVersion = "1.2.8.RELEASE"
}
repositories {
jcenter()
maven { url "https://dl.bintray.com/spinnaker/gradle" }
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath 'com.netflix.spinnaker.gradle:spinnaker-gradle-project:3.15.0'
classpath "org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}"
}
}
group = "com.netflix.spinnaker.spinnaker"
apply plugin: 'spinnaker.project'
apply plugin: 'nebula.ospackage'
apply plugin: 'java'
String toVers(String v) {
int idx = v.indexOf('-')
if (idx != -1) {
return v.substring(0, idx)
}
return v
}
ospackage {
// common installation paths
def spinnakerHome = "/opt/" + project.name
// global package requirements
packageName = project.name
version = toVers(project.version.toString())
release '3'
// installer scripts
preInstall = file('pkg_scripts/preInstall.sh')
postInstall = file('pkg_scripts/postInstall.sh')
postUninstall = file('pkg_scripts/postUninstall.sh')
from('install') {
into spinnakerHome + '/install'
}
from(file('etc/init/spinnaker.conf')) {
into('/etc/init')
user = 'root'
permissionGroup = 'root'
fileType = CONFIG | NOREPLACE
}
from('config') {
into spinnakerHome + '/config'
fileMode = 0644
}
from('etc/apache2/sites-available/spinnaker.conf') {
into '/etc/apache2/sites-available'
user = 'root'
permissionGroup = 'root'
fileMode = 0644
}
from('etc/default/spinnaker') {
into '/etc/default'
user = 'root'
permissionGroup = 'root'
fileMode = 0644
}
configurationFile('/etc/default/spinnaker\n')
configurationFile('/etc/apache2/sites-available/spinnaker.conf\n')
File configDir
FileCollection collection = files { configDir.listFiles() }
configDir = file('config')
collection.each { configurationFile(spinnakerHome + '/' + relativePath(it) + '\n') }
}
// Ubuntu
buildDeb {
// requires('openjdk-8-jdk')
// requires('oracle-java8-installer')
requires('redis-server', '3.0.5', GREATER | EQUAL)
requires('spinnaker-clouddriver')
requires('spinnaker-deck')
requires('spinnaker-echo')
requires('spinnaker-fiat')
requires('spinnaker-front50')
requires('spinnaker-gate')
requires('spinnaker-igor')
requires('spinnaker-orca')
requires('spinnaker-rosco')
requires('apache2')
}
// TO DO
buildRpm {
arch = NOARCH
os = LINUX
}