Skip to content

Commit cfe5b82

Browse files
committed
chore: add Barman versions in a container image
Adding the Barman by version and Debian distribution into an image to later use as a provider to for the system images Closes #290 Signed-off-by: Jonathan Gonzalez V <[email protected]>
1 parent 6b1ac06 commit cfe5b82

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

docker-bake.hcl

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ variable "revision" {
1616
}
1717

1818
fullname = ( environment == "testing") ? "${registry}/postgresql-testing" : "${registry}/postgresql"
19+
barmanFullname = ( environment == "testing") ? "${registry}/barman-testing" : "${registry}/barman"
1920
now = timestamp()
2021
authors = "The CloudNativePG Contributors"
2122
url = "https://github.com/cloudnative-pg/postgres-containers"
@@ -106,6 +107,46 @@ target "default" {
106107
}
107108
}
108109

110+
target "barman" {
111+
matrix = {
112+
pgVersion = postgreSQLVersions
113+
base = [
114+
// renovate: datasource=docker versioning=loose
115+
"debian:trixie-slim@sha256:c85a2732e97694ea77237c61304b3bb410e0e961dd6ee945997a06c788c545bb",
116+
// renovate: datasource=docker versioning=loose
117+
"debian:bookworm-slim@sha256:b1a741487078b369e78119849663d7f1a5341ef2768798f7b7406c4240f86aef",
118+
// renovate: datasource=docker versioning=loose
119+
"debian:bullseye-slim@sha256:849d9d34d5fe0bf88b5fb3d09eb9684909ac4210488b52f4f7bbe683eedcb851"
120+
]
121+
barmanVersion = [
122+
"3.14.1",
123+
"3.15.0"
124+
]
125+
}
126+
platforms = [
127+
"linux/amd64",
128+
"linux/arm64"
129+
]
130+
131+
132+
dockerfile = "Dockerfile.barman"
133+
name = "barman-${barmanVersion}-${distroVersion(base)}"
134+
tags = [
135+
"${barmanFullname}:${barmanVerison}-${distroVersion(base)}",
136+
"${barmanFullname}:${barmanVersion}-${formatdate("YYYYMMDDhhmm", now)}-${distroVersion(base)}"
137+
]
138+
context = "."
139+
target = "barman"
140+
args = {
141+
BARMAN_VERSION = "${barmanVersion}"
142+
BASE = "${base}"
143+
}
144+
attest = [
145+
"type=provenance,mode=max",
146+
"type=sbom"
147+
]
148+
}
149+
109150
function tag {
110151
params = [ imageNameWithSha ]
111152
result = index(split("@", index(split(":", imageNameWithSha), 1)), 0)

0 commit comments

Comments
 (0)