-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
72 lines (62 loc) · 2.32 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
plugins {
id 'java'
id 'org.springframework.boot' version '3.4.1'
id 'io.spring.dependency-management' version '1.1.7'
id 'com.avast.gradle.docker-compose' version '0.17.12'
}
group = 'com.github.nagyesta.lowkeyvault.example'
version = '0.0.1-SNAPSHOT'
java {
sourceCompatibility = '17'
}
repositories {
mavenCentral()
}
ext {
set('springCloudAzureVersion', "5.19.0")
}
dependencies {
implementation "com.azure.spring:spring-cloud-azure-starter-keyvault-secrets"
implementation "com.azure.spring:spring-cloud-azure-starter-keyvault"
testImplementation "org.springframework.boot:spring-boot-starter-test"
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
}
dependencyManagement {
imports {
mavenBom "com.azure.spring:spring-cloud-azure-dependencies:${springCloudAzureVersion}"
}
}
dockerCompose {
useComposeFiles = ['docker-compose.yml']
forceRecreate = true
waitForTcpPorts = true
retainContainersOnStartupFailure = false
captureContainersOutput = false
projectName = 'lowkey-vault-spring-starter'
dockerComposeWorkingDirectory = project.file("${projectDir}/local")
}
test {
useJUnitPlatform()
systemProperty("javax.net.ssl.trustStore", file("$projectDir/local/lowkey-vault/lowkey-vault-keystore.p12"))
systemProperty("javax.net.ssl.trustStorePassword", "changeit")
systemProperty("javax.net.ssl.trustStoreType", "PKCS12")
// Only needed if Assumed Identity and DefaultAzureCredential is used to simulate IMDS managed identity
environment "IDENTITY_ENDPOINT", "http://localhost:10544/metadata/identity/oauth2/token"
environment "IDENTITY_HEADER", "header"
testLogging.showStandardStreams = true
// make sure the containers are running
dependsOn tasks.composeUp
finalizedBy tasks.composeDown
}
bootRun {
systemProperty("spring.profiles.active", "dev")
systemProperty("javax.net.ssl.trustStore", file("$projectDir/local/lowkey-vault/lowkey-vault-keystore.p12"))
systemProperty("javax.net.ssl.trustStorePassword", "changeit")
systemProperty("javax.net.ssl.trustStoreType", "PKCS12")
// Only needed if Assumed Identity and DefaultAzureCredential is used to simulate IMDS managed identity
environment "IDENTITY_ENDPOINT", "http://localhost:10544/metadata/identity/oauth2/token"
environment "IDENTITY_HEADER", "header"
// make sure the containers are running
dependsOn tasks.composeUp
finalizedBy tasks.composeDown
}