diff --git a/bake/bake.go b/bake/bake.go index 3bd26f26..cc140da5 100644 --- a/bake/bake.go +++ b/bake/bake.go @@ -426,7 +426,7 @@ type Target struct { Outputs []string `json:"output,omitempty" hcl:"output,optional"` Pull *bool `json:"pull,omitempty" hcl:"pull,optional"` NoCache *bool `json:"no-cache,omitempty" hcl:"no-cache,optional"` - NetworkMode *string `json:"network,omitempty" hcl:"network,optional"` + NetworkMode *string // IMPORTANT: if you add more fields here, do not forget to update newOverrides and README. } diff --git a/bake/hcl_test.go b/bake/hcl_test.go index 53d25cdc..892f6bdd 100644 --- a/bake/hcl_test.go +++ b/bake/hcl_test.go @@ -36,7 +36,6 @@ func TestHCLBasic(t *testing.T) { target "webapp-plus" { inherits = ["webapp", "cross"] - network = "host" args = { IAMCROSS = "true" } @@ -64,7 +63,6 @@ func TestHCLBasic(t *testing.T) { require.Equal(t, c.Targets[3].Name, "webapp-plus") require.Equal(t, 1, len(c.Targets[3].Args)) require.Equal(t, map[string]string{"IAMCROSS": "true"}, c.Targets[3].Args) - require.Equal(t, "host", *c.Targets[3].NetworkMode) } func TestHCLBasicInJSON(t *testing.T) { @@ -95,7 +93,6 @@ func TestHCLBasicInJSON(t *testing.T) { }, "webapp-plus": { "inherits": ["webapp", "cross"], - "network": "host", "args": { "IAMCROSS": "true" } @@ -126,7 +123,6 @@ func TestHCLBasicInJSON(t *testing.T) { require.Equal(t, c.Targets[3].Name, "webapp-plus") require.Equal(t, 1, len(c.Targets[3].Args)) require.Equal(t, map[string]string{"IAMCROSS": "true"}, c.Targets[3].Args) - require.Equal(t, "host", *c.Targets[3].NetworkMode) } func TestHCLWithFunctions(t *testing.T) {