-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
61 lines (53 loc) · 1.19 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
plugins {
id 'java'
id 'com.palantir.docker' version '0.20.1'
id 'com.palantir.docker-run' version '0.20.1'
}
repositories {
mavenCentral()
}
task dist {
delete 'cnf/run/bundle/tmp'
delete 'cnf/run/bundle/distributions'
def aggSourceDirs = [] as LinkedList
bndWorkspace.allProjects.each{
def genFolder = it.targetDir
copy {
from genFolder
into 'cnf/run/bundle/'
include '**/*.jar'
exclude '**/net.younic.admin.jar'
}
}
copy {
from 'net.younic.admin/generated/net.younic.admin.jar'
into 'cnf/run/bundle-adm/'
}
delete 'cnf/run/felix-cache'
}
task packageZip(type: Zip) {
archiveName = "younic.zip"
destinationDir = file("cnf/release")
from "cnf/run"
}
docker (){
name 'escv/younic'
//name 'hub.docker.com/escv/younic'
tags 'latest'
dockerfile file('container/Dockerfile')
files 'cnf/release/younic.zip'
pull true
noCache true
}
dockerRun {
name 'younic'
image 'escv/younic'
ports '8282:8080'
clean true
daemonize true
env 'YOUNIC_CMS_ROOT_GIT': 'https://github.com/escv/younic-sample.git'
}
compileJava.dependsOn clean
dist.dependsOn jar
packageZip.dependsOn dist
docker.dependsOn packageZip