-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.gradle
More file actions
63 lines (53 loc) · 1.65 KB
/
build.gradle
File metadata and controls
63 lines (53 loc) · 1.65 KB
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
buildscript {
repositories {
mavenLocal()
mavenCentral()
maven { url 'http://files.boxfuse.com' } // https is disabled until https://issues.gradle.org/browse/GRADLE-3250 (SNI support) is fixed
}
dependencies {
classpath "com.boxfuse.client:boxfuse-gradle-plugin:1.6.1.619"
}
}
group = 'dwunikernel'
version = '0-SNAPSHOT'
apply plugin: 'boxfuse'
apply plugin: 'java'
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
compile 'io.dropwizard:dropwizard-core:0.8.1'
testCompile 'junit:junit:4.12'
testCompile 'org.apache.httpcomponents:fluent-hc:4.3.6'
}
jar {
manifest {
attributes "Main-Class": "dwunikernel.DwUnikernelApplication"
}
from {
configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
}
}
//Run deploy & run integration tests in test environment
boxfuse {
env='test'
}
task boxfuseRunTest( type: com.boxfuse.client.gradle.task.RunTask )
task boxfuseKillTest( type: com.boxfuse.client.gradle.task.KillTask )
task testConfig (dependsOn: boxfuseRunTest) << {
project.tasks.test.systemProperty 'instanceUrl', boxfuse.instancesResult[0].url
}
test.dependsOn(testConfig)
test.finalizedBy(boxfuseKillTest)
//Deploy with zero-downtime on prod environment
extensions.create('boxfuseProd', com.boxfuse.client.gradle.BoxfuseExtension)
boxfuseProd {
env='prod'
}
task boxfuseProdConfig (dependsOn: boxfuseKillTest) << {
project.tasks.boxfuseRunProd.extension = boxfuseProd
boxfuseProd.image=boxfuse.image
}
task boxfuseRunProd( type: com.boxfuse.client.gradle.task.RunTask, dependsOn: boxfuseProdConfig )
check.dependsOn(boxfuseRunProd)