2021-03-29 19:18:19 +08:00
|
|
|
variable "NODE_VERSION" {
|
|
|
|
default = "12"
|
2020-10-25 09:25:23 +08:00
|
|
|
}
|
|
|
|
|
2021-03-29 19:18:19 +08:00
|
|
|
target "node-version" {
|
|
|
|
args = {
|
|
|
|
NODE_VERSION = NODE_VERSION
|
|
|
|
}
|
2020-10-25 09:25:23 +08:00
|
|
|
}
|
|
|
|
|
2021-03-29 19:18:19 +08:00
|
|
|
group "default" {
|
|
|
|
targets = ["build"]
|
2020-12-19 10:53:36 +08:00
|
|
|
}
|
|
|
|
|
2021-03-29 19:18:19 +08:00
|
|
|
group "pre-checkin" {
|
|
|
|
targets = ["vendor-update", "format", "build"]
|
2020-10-25 09:25:23 +08:00
|
|
|
}
|
|
|
|
|
2021-03-29 19:18:19 +08:00
|
|
|
group "validate" {
|
|
|
|
targets = ["format-validate", "build-validate", "vendor-validate"]
|
2020-10-25 09:25:23 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
target "build" {
|
2021-03-29 19:18:19 +08:00
|
|
|
inherits = ["node-version"]
|
|
|
|
dockerfile = "./hack/build.Dockerfile"
|
|
|
|
target = "build-update"
|
2020-10-25 09:25:23 +08:00
|
|
|
output = ["."]
|
|
|
|
}
|
|
|
|
|
2021-03-29 19:18:19 +08:00
|
|
|
target "build-validate" {
|
|
|
|
inherits = ["node-version"]
|
|
|
|
dockerfile = "./hack/build.Dockerfile"
|
|
|
|
target = "build-validate"
|
2020-10-25 09:25:23 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
target "format" {
|
2021-03-29 19:18:19 +08:00
|
|
|
inherits = ["node-version"]
|
|
|
|
dockerfile = "./hack/build.Dockerfile"
|
|
|
|
target = "format-update"
|
2020-10-25 09:25:23 +08:00
|
|
|
output = ["."]
|
|
|
|
}
|
|
|
|
|
2021-03-29 19:18:19 +08:00
|
|
|
target "format-validate" {
|
|
|
|
inherits = ["node-version"]
|
|
|
|
dockerfile = "./hack/build.Dockerfile"
|
|
|
|
target = "format-validate"
|
|
|
|
}
|
|
|
|
|
|
|
|
target "vendor-update" {
|
|
|
|
inherits = ["node-version"]
|
|
|
|
dockerfile = "./hack/vendor.Dockerfile"
|
|
|
|
target = "update"
|
|
|
|
output = ["."]
|
2020-10-25 09:25:23 +08:00
|
|
|
}
|
|
|
|
|
2021-03-29 19:18:19 +08:00
|
|
|
target "vendor-validate" {
|
|
|
|
inherits = ["node-version"]
|
|
|
|
dockerfile = "./hack/vendor.Dockerfile"
|
|
|
|
target = "validate"
|
2020-10-25 09:25:23 +08:00
|
|
|
}
|
|
|
|
|
2021-03-29 19:18:19 +08:00
|
|
|
target "test" {
|
|
|
|
inherits = ["node-version"]
|
|
|
|
dockerfile = "./hack/test.Dockerfile"
|
|
|
|
target = "test-coverage"
|
|
|
|
output = ["./coverage"]
|
2020-10-25 09:25:23 +08:00
|
|
|
}
|