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:
parent
aa7e1cdd9e
commit
2cbd9268f6
@ -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),
|
||||
|
@ -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",
|
||||
},
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user