1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2024-12-24 10:07:21 +02:00

Deprecate secrets in favor of from_secret (#4360)

This commit is contained in:
6543 2024-11-18 21:26:46 +01:00 committed by GitHub
parent aa7e1cdd9e
commit 2cbd9268f6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -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),

View File

@ -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",
},
}