-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
70 lines (63 loc) · 2.43 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
plugins {
id 'java'
id 'org.springframework.boot' version '3.1.0'
id 'io.spring.dependency-management' version '1.1.0'
id 'com.google.cloud.tools.jib' version '3.3.1'
}
group = 'com.poppin'
version = '0.0.1-SNAPSHOT'
java {
sourceCompatibility = '17'
}
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
repositories {
mavenCentral()
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.0.4'
implementation 'com.github.gavlyukovskiy:p6spy-spring-boot-starter:1.9.0'
testImplementation 'junit:junit:4.13.1'
testImplementation 'org.projectlombok:lombok:1.18.22'
compileOnly 'org.projectlombok:lombok'
runtimeOnly 'com.mysql:mysql-connector-j'
runtimeOnly 'io.micrometer:micrometer-registry-prometheus'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
}
jib {
from {
image = 'amazoncorretto:17-alpine-jdk'
}
to {
image = 'poppinteam/backend-server'
tags = ['git rev-parse --verify --short HEAD'.execute().text.trim(), 'latest']
}
container {
ports = ["8080"]
// jvmFlags = ['-Dspring.profiles.active=prod', '-XX:+UseContainerSupport', '-Dserver.port=8080', '-Dfile.encoding=UTF-8', '-javaagent:/elastic-apm/elastic-apm-agent.jar', '-Delastic.apm.service_name=backend-server', '-Delastic.apm.server_url=http://apm-server-apm-server.elastic.svc.cluster.local:8200', '-Delastic.apm.secret_token=', '-Delastic.apm.environment=production', '-Delastic.apm.application_packages=com.poppin']
jvmFlags = [
'-Dspring.profiles.active=prod',
'-XX:+UseContainerSupport',
'-Dserver.port=8080',
'-Dfile.encoding=UTF-8',
'-javaagent:/otel/opentelemetry-javaagent.jar',
'-Dotel.service.name=backend-server',
'-Dotel.exporter.otlp.endpoint=http://grafana-agent.tempo.svc.cluster.local:4317',
'-Dotel.exporter.otlp.insecure=true',
'-Dotel.exporter.otlp.logs.endpoint=http://grafana-agent.tempo.svc.cluster.local:4317',
'-Dotel.exporter.otlp.logs.insecure=true',
'-Dlogging.level.org.springframework.web.filter.CommonsRequestLoggingFilter=DEBUG',
'-Dlogging.pattern.console=%d{yyyy-MM-dd HH:mm:ss} - %logger{36} - %msg traceID=%X{traceId} %n'
]
}
}
tasks.named('test') {
useJUnitPlatform()
}