diff --git a/pipeline/frontend/yaml/linter/linter.go b/pipeline/frontend/yaml/linter/linter.go index e081142ac..e11a09efb 100644 --- a/pipeline/frontend/yaml/linter/linter.go +++ b/pipeline/frontend/yaml/linter/linter.go @@ -186,10 +186,10 @@ func (l *Linter) lintContainerDeprecations(config *WorkflowConfig, c *types.Cont }) } - if c.Secrets.LegacyFormat { + if len(c.Secrets.Secrets) != 0 { err = multierr.Append(err, &errorTypes.PipelineError{ Type: errorTypes.PipelineErrorTypeDeprecation, - Message: "Alternative names syntax for `secrets` is deprecated, use list syntax or `from_secret` instead", + Message: "Secrets are deprecated, use environment with from_secret", Data: errors.DeprecationErrorData{ File: config.File, Field: fmt.Sprintf("%s.%s.secrets", field, c.Name), diff --git a/pipeline/frontend/yaml/linter/linter_test.go b/pipeline/frontend/yaml/linter/linter_test.go index 63c5be485..5859b9c2b 100644 --- a/pipeline/frontend/yaml/linter/linter_test.go +++ b/pipeline/frontend/yaml/linter/linter_test.go @@ -175,7 +175,7 @@ func TestLintErrors(t *testing.T) { }, { from: "steps: { build: { image: golang, secrets: [ { source: mysql_username, target: mysql_username } ] } }", - want: "Alternative names syntax for `secrets` is deprecated, use list syntax or `from_secret` instead", + want: "Secrets are deprecated, use environment with from_secret", }, }