refactor(server): source build version from git tag
- Stamp version, channel and vendor into META-INF/build-info.properties - Read build metadata at runtime from BuildProperties instead of expanded YAML - Remove app.common placeholders from application.yaml - Derive the OpenAPI info version from the packaged build version - Point the OCI image source label at the GitHub repository - Drop redundant repository blocks from settings.gradle.kts
This commit is contained in:
8 files changed
+44
-52
No files matched your search
+16
-11
@@ -23,6 +23,22 @@ java {
|
||||
}
|
||||
}
|
||||
|
||||
// Generate META-INF/build-info.properties at build time. The build version comes
|
||||
// from the project version (driven by the git tag in CI); channel and vendor are
|
||||
// stamped alongside it so the runtime no longer needs template placeholders.
|
||||
springBoot {
|
||||
buildInfo {
|
||||
properties {
|
||||
additional.set(
|
||||
mapOf(
|
||||
"channel" to buildChannel,
|
||||
"vendor" to vendor
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// BOMs are imported as platforms, so they cannot be bundled.
|
||||
implementation(platform(libs.aws.sdk.bom))
|
||||
@@ -48,17 +64,6 @@ dependencies {
|
||||
testRuntimeOnly(libs.bundles.testRuntime)
|
||||
}
|
||||
|
||||
tasks.processResources {
|
||||
filesMatching("application.yaml") {
|
||||
println("appVersion = ${artefactVersion}, channel = ${buildChannel}, vendor = ${vendor}")
|
||||
expand(
|
||||
"appVersion" to artefactVersion,
|
||||
"channel" to buildChannel,
|
||||
"vendor" to vendor
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
tasks.test {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
Reference in new issue
Block a user