-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
87 lines (72 loc) · 1.96 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
76
77
78
79
80
81
82
83
84
85
plugins {
id 'org.springframework.boot' version '3.2.4'
id 'io.spring.dependency-management' version '1.1.4'
id 'java'
id 'net.researchgate.release' version '3.0.2'
id 'jacoco'
}
group = 'de.ingenhaag'
java {
sourceCompatibility = JavaVersion.VERSION_21
}
repositories {
mavenCentral()
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springframework.boot:spring-boot-starter-data-mongodb'
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-api:2.4.0'
runtimeOnly 'io.micrometer:micrometer-registry-prometheus'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.springframework.boot:spring-boot-testcontainers'
testImplementation 'org.testcontainers:junit-jupiter'
testImplementation 'org.testcontainers:mongodb'
testImplementation 'de.cronn:validation-file-assertions:0.7.0'
testImplementation 'org.wiremock:wiremock-standalone:3.4.2'
}
tasks.named('test') {
useJUnitPlatform()
}
bootBuildImage {
imageName = "ghcr.io/chrisingenhaag/${project.name}:${project.version}"
tags = ["ghcr.io/chrisingenhaag/${project.name}:${System.getenv("GH_BRANCH")}"]
publish = !project.version.contains("-SNAPSHOT")
docker {
publishRegistry {
url = "ghcr.io"
username = System.getenv("GH_USERNAME") ?: "n/a"
password = System.getenv("GH_TOKEN") ?: "n/a"
}
}
}
release {
buildTasks.add('bootBuildImage')
git {
requireBranch.set('main')
pushOptions.add("-o ci.skip")
preCommitText = "[ci skip]"
}
}
test {
finalizedBy jacocoTestReport, jacocoTestCoverageVerification
}
jacocoTestReport {
dependsOn test
reports {
xml.required = true
csv.required = false
html.required = true
}
}
jacocoTestCoverageVerification {
violationRules {
rule {
limit {
minimum = 0.80
counter = 'LINE'
}
}
}
}