1
0
mirror of https://github.com/docker/docker-credential-helpers.git synced 2026-06-13 16:01:28 +05:30
Files
docker-credential-helpers/docker-bake.hcl
T
2022-08-28 20:53:51 +02:00

74 lines
1.2 KiB
HCL

variable "GO_VERSION" {
default = "1.18.5"
}
# Defines the output folder
variable "DESTDIR" {
default = ""
}
function "bindir" {
params = [defaultdir]
result = DESTDIR != "" ? DESTDIR : "./bin/${defaultdir}"
}
target "_common" {
args = {
GO_VERSION = GO_VERSION
}
}
group "default" {
targets = ["binaries"]
}
group "validate" {
targets = ["lint", "vendor-validate"]
}
target "lint" {
inherits = ["_common"]
target = "lint"
output = ["type=cacheonly"]
}
target "vendor-validate" {
inherits = ["_common"]
target = "vendor-validate"
output = ["type=cacheonly"]
}
target "vendor" {
inherits = ["_common"]
target = "vendor-update"
output = ["."]
}
target "test" {
inherits = ["_common"]
target = "test-coverage"
output = [bindir("coverage")]
}
target "binaries" {
inherits = ["_common"]
target = "binaries"
output = [bindir("build")]
platforms = [
"darwin/amd64",
"darwin/arm64",
"linux/amd64",
"linux/arm64",
"linux/arm/v7",
"linux/arm/v6",
"linux/ppc64le",
"linux/s390x",
"windows/amd64"
]
}
target "release" {
inherits = ["binaries"]
target = "release"
output = [bindir("release")]
}