|
1 | | -group "default" { |
2 | | - targets = ["build"] |
| 1 | +variable "NODE_VERSION" { |
| 2 | + default = "12" |
3 | 3 | } |
4 | 4 |
|
5 | | -group "pre-checkin" { |
6 | | - targets = ["update-yarn", "format", "build"] |
| 5 | +target "node-version" { |
| 6 | + args = { |
| 7 | + NODE_VERSION = NODE_VERSION |
| 8 | + } |
7 | 9 | } |
8 | 10 |
|
9 | | -group "validate" { |
10 | | - targets = ["validate-format", "validate-build", "validate-yarn"] |
| 11 | +group "default" { |
| 12 | + targets = ["build"] |
11 | 13 | } |
12 | 14 |
|
13 | | -target "dockerfile" { |
14 | | - dockerfile = "Dockerfile.dev" |
| 15 | +group "pre-checkin" { |
| 16 | + targets = ["vendor-update", "format", "build"] |
15 | 17 | } |
16 | 18 |
|
17 | | -target "update-yarn" { |
18 | | - inherits = ["dockerfile"] |
19 | | - target = "update-yarn" |
20 | | - output = ["."] |
| 19 | +group "validate" { |
| 20 | + targets = ["format-validate", "build-validate", "vendor-validate"] |
21 | 21 | } |
22 | 22 |
|
23 | 23 | target "build" { |
24 | | - inherits = ["dockerfile"] |
25 | | - target = "dist" |
| 24 | + inherits = ["node-version"] |
| 25 | + dockerfile = "./hack/build.Dockerfile" |
| 26 | + target = "build-update" |
26 | 27 | output = ["."] |
27 | 28 | } |
28 | 29 |
|
29 | | -target "test" { |
30 | | - inherits = ["dockerfile"] |
31 | | - target = "test-coverage" |
32 | | - output = ["."] |
| 30 | +target "build-validate" { |
| 31 | + inherits = ["node-version"] |
| 32 | + dockerfile = "./hack/build.Dockerfile" |
| 33 | + target = "build-validate" |
33 | 34 | } |
34 | 35 |
|
35 | 36 | target "format" { |
36 | | - inherits = ["dockerfile"] |
37 | | - target = "format" |
| 37 | + inherits = ["node-version"] |
| 38 | + dockerfile = "./hack/build.Dockerfile" |
| 39 | + target = "format-update" |
38 | 40 | output = ["."] |
39 | 41 | } |
40 | 42 |
|
41 | | -target "validate-format" { |
42 | | - inherits = ["dockerfile"] |
43 | | - target = "validate-format" |
| 43 | +target "format-validate" { |
| 44 | + inherits = ["node-version"] |
| 45 | + dockerfile = "./hack/build.Dockerfile" |
| 46 | + target = "format-validate" |
| 47 | +} |
| 48 | + |
| 49 | +target "vendor-update" { |
| 50 | + inherits = ["node-version"] |
| 51 | + dockerfile = "./hack/vendor.Dockerfile" |
| 52 | + target = "update" |
| 53 | + output = ["."] |
44 | 54 | } |
45 | 55 |
|
46 | | -target "validate-build" { |
47 | | - inherits = ["dockerfile"] |
48 | | - target = "validate-build" |
| 56 | +target "vendor-validate" { |
| 57 | + inherits = ["node-version"] |
| 58 | + dockerfile = "./hack/vendor.Dockerfile" |
| 59 | + target = "validate" |
49 | 60 | } |
50 | 61 |
|
51 | | -target "validate-yarn" { |
52 | | - inherits = ["dockerfile"] |
53 | | - target = "validate-yarn" |
| 62 | +target "test" { |
| 63 | + inherits = ["node-version"] |
| 64 | + dockerfile = "./hack/test.Dockerfile" |
| 65 | + target = "test-coverage" |
| 66 | + output = ["./coverage"] |
54 | 67 | } |
0 commit comments