-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
61 lines (54 loc) · 1.88 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 'io.spring.dependency-management' version "1.0.9.RELEASE"
id 'org.springframework.boot' version '2.2.5.RELEASE'
id 'pl.allegro.tech.build.axion-release' version '1.10.1'
id 'com.palantir.docker' version '0.25.0'
id 'com.palantir.docker-run' version '0.25.0'
id 'jp.classmethod.aws.cloudformation' version '0.41'
}
version = scmVersion.version
sourceCompatibility = 11
repositories {
mavenCentral()
jcenter()
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-devtools'
implementation group: 'com.h2database', name: 'h2', version: '1.3.148'
compileOnly 'org.projectlombok:lombok:1.18.12'
annotationProcessor 'org.projectlombok:lombok:1.18.12'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
}
test {
useJUnitPlatform()
}
// configure the com.palantir.docker plugin
String dockerHubUsernameProperty = findProperty('dockerHubUsername') ?: 'maschmidt'
String imageName = "${dockerHubUsernameProperty}/studios-service:$version"
docker {
name imageName
files "build/libs/${bootJar.archiveFileName.get()}"
buildArgs([JAR_FILE: bootJar.archiveFileName.get()])
}
// configure the com.palantir.docker-run plugin
dockerRun {
name project.name
image imageName
ports '8090:8080'
clean true
}
// configure jp.classmethod.aws.cloudformation plugin
cloudFormation {
stackName "$project.name-stack"
stackParams([
SubnetID: findProperty('subnetId') ?: '',
ServiceName: project.name,
ServiceVersion: project.version,
DockerHubUsername: dockerHubUsernameProperty
])
templateFile project.file("ecs.yml")
}