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:
+14
-2
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user