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