add common args bake target
+variable "GO_VERSION" {
+ default = "1.16.11"
+}
variable "VERSION" {
default = ""
}
@@ -16,11 +19,19 @@ variable "COMPANY_NAME" {
default = ""
}
+target "_common" {
+ args = {
+ GO_VERSION = GO_VERSION
+ BUILDKIT_CONTEXT_KEEP_GIT_DIR = 1
+ }
+}
+
group "default" {
targets = ["binary"]
}
target "binary" {
+ inherits = ["_common"]
target = "binary"
platforms = ["local"]
output = ["build"]
@@ -40,6 +51,7 @@ target "dynbinary" {
}
target "plugins" {
+ inherits = ["_common"]
target = "plugins"
platforms = ["local"]
output = ["build"]
@@ -67,12 +79,14 @@ target "plugins-cross" {
}
target "lint" {
+ inherits = ["_common"]
dockerfile = "./dockerfiles/Dockerfile.lint"
target = "lint"
output = ["type=cacheonly"]
}
target "shellcheck" {
+ inherits = ["_common"]
dockerfile = "./dockerfiles/Dockerfile.shellcheck"
target = "shellcheck"
output = ["type=cacheonly"]
