-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
75 lines (68 loc) · 2.09 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
plugins {
id 'java'
id 'org.springframework.boot' version '2.3.1.RELEASE'
id 'io.spring.dependency-management' version '1.0.8.RELEASE'
// 現時点最新の3.4.1をgradleで参照すると何故か依存関係のエラーが出るので、3.3を参照。mavenならOKなんだけど..
id 'com.google.cloud.tools.jib' version '3.3.2'
}
group = 'com.example'
version = '0.0.2-SNAPSHOT'
java {
sourceCompatibility = 'VERSION_11'
targetCompatibility = 'VERSION_11'
}
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
repositories {
mavenCentral()
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-actuator'
runtimeOnly 'io.micrometer:micrometer-registry-prometheus'
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
implementation 'org.springframework.boot:spring-boot-starter-web'
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
}
tasks.named('test') {
useJUnitPlatform()
}
jib {
from {
// digestを指定しないとJibがImmutableにならないぞと脅してくるので追加
//image = 'amazoncorretto:11-al2023-headless@sha256:2251663364120506240dae6a9e8e4df1225841065b227db98338e24b23b12004'
//でもmultiarchビルドしたいので一旦コメント
image = 'amazoncorretto:11-al2023-headless'
platforms {
platform {
architecture = 'amd64'
os = 'linux'
}
platform {
architecture = 'arm64'
os = 'linux'
}
}
}
to {
// これで、現在のVersion(ex:0.0.1-snapshot)とlatestのTagを付与してくれる
image = 'ghcr.io/hyakutem/ecsfgex'
tags = ["${project.version}"]
// 認証の設定はgradleの設定には書かずに、actions側で指定する方が良いかも
//auth {
//username = 'AWS'
//password = 'aws ecr get-login-password --region ap-northeast-1'.execute().text.trim()
//}
}
container {
jvmFlags = [
'-XshowSettings',
'-XX:+PrintFlagsFinal'
]
}
}