forked from repo-mirrors/cnpg-postgres-containers
chore: migrate rolling tags to bake system images (#297)
Closes #284 Closes #285 Signed-off-by: Niccolò Fei <niccolo.fei@enterprisedb.com> Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com> Co-authored-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
This commit is contained in:
@@ -70,11 +70,11 @@ target "default" {
|
||||
]
|
||||
dockerfile = "Dockerfile"
|
||||
name = "postgresql-${index(split(".",cleanVersion(pgVersion)),0)}-${tgt}-${distroVersion(base)}"
|
||||
tags = [
|
||||
tags = concat([
|
||||
"${fullname}:${index(split(".",cleanVersion(pgVersion)),0)}-${tgt}-${distroVersion(base)}",
|
||||
"${fullname}:${cleanVersion(pgVersion)}-${tgt}-${distroVersion(base)}",
|
||||
"${fullname}:${cleanVersion(pgVersion)}-${formatdate("YYYYMMDDhhmm", now)}-${tgt}-${distroVersion(base)}"
|
||||
]
|
||||
"${fullname}:${cleanVersion(pgVersion)}-${formatdate("YYYYMMDDhhmm", now)}-${tgt}-${distroVersion(base)}",
|
||||
], (tgt == "system" && distroVersion(base) == "bullseye") ? getRollingTags("${fullname}", pgVersion) : [])
|
||||
context = "."
|
||||
target = "${tgt}"
|
||||
args = {
|
||||
@@ -170,3 +170,11 @@ function getPgVersions {
|
||||
]
|
||||
)
|
||||
}
|
||||
|
||||
function getRollingTags {
|
||||
params = [ imageName, pgVersion ]
|
||||
result = [
|
||||
format("%s:%s", imageName, pgVersion),
|
||||
format("%s:%s", imageName, getMajor(pgVersion))
|
||||
]
|
||||
}
|
||||
|
Reference in New Issue
Block a user