From 2cbd9268f6a5a5aae3384ff2e3dd12e210a083ea Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Mon, 18 Nov 2024 21:26:46 +0100 Subject: [PATCH] Deprecate `secrets` in favor of `from_secret` (#4360) --- pipeline/frontend/yaml/linter/linter.go | 4 ++-- pipeline/frontend/yaml/linter/linter_test.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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", }, }