mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-05-18 00:47:48 +08:00
Remove NetworkMode support for HCL targets
Signed-off-by: Zachary Povey <zachary.povey@autotrader.co.uk>
This commit is contained in:
parent
ae53101e89
commit
4ee7f70400
@ -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.
|
||||
}
|
||||
|
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user