diff --git a/compiler/native/compile_test.go b/compiler/native/compile_test.go index 5fbfc07a2..a9a742250 100644 --- a/compiler/native/compile_test.go +++ b/compiler/native/compile_test.go @@ -1441,8 +1441,9 @@ func TestNative_Compile_Pipeline_Type(t *testing.T) { Version: "1", ID: "__0", Metadata: pipeline.Metadata{ - Clone: true, - Template: false, + Clone: true, + Template: false, + Environment: []string{"steps", "services", "secrets"}, }, Steps: pipeline.ContainerSlice{ &pipeline.Container{ @@ -1485,8 +1486,9 @@ func TestNative_Compile_Pipeline_Type(t *testing.T) { Version: "1", ID: "__0", Metadata: pipeline.Metadata{ - Clone: true, - Template: false, + Clone: true, + Template: false, + Environment: []string{"steps", "services", "secrets"}, }, Steps: pipeline.ContainerSlice{ &pipeline.Container{ @@ -1529,8 +1531,9 @@ func TestNative_Compile_Pipeline_Type(t *testing.T) { Version: "1", ID: "__0", Metadata: pipeline.Metadata{ - Clone: true, - Template: false, + Clone: true, + Template: false, + Environment: []string{"steps", "services", "secrets"}, }, Steps: pipeline.ContainerSlice{ &pipeline.Container{ diff --git a/compiler/native/parse_test.go b/compiler/native/parse_test.go index 1a04b6e68..909e8d848 100644 --- a/compiler/native/parse_test.go +++ b/compiler/native/parse_test.go @@ -180,6 +180,9 @@ func TestNative_Parse_Parameters(t *testing.T) { // setup types client, _ := New(cli.NewContext(nil, flag.NewFlagSet("test", 0), nil)) want := &yaml.Build{ + Metadata: yaml.Metadata{ + Environment: []string{"steps", "services", "secrets"}, + }, Steps: yaml.StepSlice{ &yaml.Step{ Image: "plugins/docker:18.09", @@ -447,6 +450,9 @@ func TestNative_Parse_Secrets(t *testing.T) { // setup types client, _ := New(cli.NewContext(nil, flag.NewFlagSet("test", 0), nil)) want := &yaml.Build{ + Metadata: yaml.Metadata{ + Environment: []string{"steps", "services", "secrets"}, + }, Secrets: yaml.SecretSlice{ &yaml.Secret{ Name: "docker_username", @@ -508,6 +514,9 @@ func TestNative_Parse_Stages(t *testing.T) { // setup types client, _ := New(cli.NewContext(nil, flag.NewFlagSet("test", 0), nil)) want := &yaml.Build{ + Metadata: yaml.Metadata{ + Environment: []string{"steps", "services", "secrets"}, + }, Stages: yaml.StageSlice{ &yaml.Stage{ Name: "install", @@ -581,6 +590,9 @@ func TestNative_Parse_Steps(t *testing.T) { // setup types client, _ := New(cli.NewContext(nil, flag.NewFlagSet("test", 0), nil)) want := &yaml.Build{ + Metadata: yaml.Metadata{ + Environment: []string{"steps", "services", "secrets"}, + }, Steps: yaml.StepSlice{ &yaml.Step{ Commands: []string{"./gradlew downloadDependencies"}, @@ -846,7 +858,7 @@ func Test_client_Parse(t *testing.T) { Metadata: yaml.Metadata{ Template: false, Clone: nil, - Environment: nil, + Environment: []string{"steps", "services", "secrets"}, }, Steps: yaml.StepSlice{ { diff --git a/go.mod b/go.mod index ceb28ff2b..6b185e2f3 100644 --- a/go.mod +++ b/go.mod @@ -14,7 +14,7 @@ require ( github.com/gin-gonic/gin v1.7.7 github.com/go-playground/assert/v2 v2.0.1 github.com/go-redis/redis/v8 v8.11.4 - github.com/go-vela/types v0.12.0 + github.com/go-vela/types v0.13.0-rc1 github.com/golang-jwt/jwt/v4 v4.3.0 github.com/google/go-cmp v0.5.7 github.com/google/go-github/v42 v42.0.0 @@ -103,7 +103,7 @@ require ( github.com/mattn/go-isatty v0.0.12 // indirect github.com/mattn/go-sqlite3 v2.0.3+incompatible // indirect github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect - github.com/microcosm-cc/bluemonday v1.0.17 // indirect + github.com/microcosm-cc/bluemonday v1.0.18 // indirect github.com/mitchellh/copystructure v1.0.0 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/go-testing-interface v1.0.0 // indirect diff --git a/go.sum b/go.sum index 2e0ddb8c2..a4b1be205 100644 --- a/go.sum +++ b/go.sum @@ -181,8 +181,8 @@ github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/me github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/go-test/deep v1.0.2 h1:onZX1rnHT3Wv6cqNgYyFOOlgVKJrksuCMCRvJStbMYw= github.com/go-test/deep v1.0.2/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= -github.com/go-vela/types v0.12.0 h1:RnliZ5sZ0ceDRNyjp8o5uPKMIgLF7Gd7JRJWgOLgOPw= -github.com/go-vela/types v0.12.0/go.mod h1:nMZJ/0tb0HO8/AVaJXHuR5slG9UPuP9or+CnkuyFcL4= +github.com/go-vela/types v0.13.0-rc1 h1:y4A5R/zbjlz/XXdwDE7iOdl+/6hgB0B/jVz9LFDfznw= +github.com/go-vela/types v0.13.0-rc1/go.mod h1:n2aGQj5hzLFUvl1LnxyzItaPKSgC7jSiuSq+6XkRly8= github.com/gofrs/uuid v4.0.0+incompatible h1:1SD/1F5pU8p29ybwgQSwpQk+mwdRrXCYuPhW6m+TnJw= github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= @@ -460,8 +460,8 @@ github.com/mattn/go-sqlite3 v2.0.3+incompatible h1:gXHsfypPkaMZrKbD5209QV9jbUTJK github.com/mattn/go-sqlite3 v2.0.3+incompatible/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/microcosm-cc/bluemonday v1.0.17 h1:Z1a//hgsQ4yjC+8zEkV8IWySkXnsxmdSY642CTFQb5Y= -github.com/microcosm-cc/bluemonday v1.0.17/go.mod h1:Z0r70sCuXHig8YpBzCc5eGHAap2K7e/u082ZUpDRRqM= +github.com/microcosm-cc/bluemonday v1.0.18 h1:6HcxvXDAi3ARt3slx6nTesbvorIc3QeTzBNRvWktHBo= +github.com/microcosm-cc/bluemonday v1.0.18/go.mod h1:Z0r70sCuXHig8YpBzCc5eGHAap2K7e/u082ZUpDRRqM= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/copystructure v1.0.0 h1:Laisrj+bAB6b/yJwB5Bt3ITZhGJdqmxquMKeZ+mmkFQ= github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw=