1
0
mirror of https://github.com/docker/docker-credential-helpers.git synced 2026-06-13 16:01:28 +05:30

Dockerfile: add test stage

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax
2022-08-20 18:55:43 +02:00
parent 0e5dbc62ad
commit e7e9118856
2 changed files with 26 additions and 2 deletions
+14 -2
View File
@@ -1,8 +1,14 @@
variable "GO_VERSION" {
default = "1.16.7"
}
# Defines the output folder
variable "DESTDIR" {
default = "./bin"
default = ""
}
function "bindir" {
params = [defaultdir]
result = DESTDIR != "" ? DESTDIR : "./bin/${defaultdir}"
}
target "_common" {
@@ -15,10 +21,16 @@ group "default" {
targets = ["binaries"]
}
target "test" {
inherits = ["_common"]
target = "test-coverage"
output = [bindir("coverage")]
}
target "binaries" {
inherits = ["_common"]
target = "binaries"
output = [DESTDIR]
output = [bindir("build")]
platforms = [
"darwin/amd64",
"darwin/arm64",