mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-09-13 01:29:28 +00:00
Deprecate secrets
(#4235)
This commit is contained in:
@@ -265,6 +265,21 @@ func (l *Linter) lintDeprecations(config *WorkflowConfig) (err error) {
|
||||
return err
|
||||
}
|
||||
|
||||
for _, container := range parsed.Steps.ContainerList {
|
||||
if len(container.Secrets) > 0 {
|
||||
err = multierr.Append(err, &errorTypes.PipelineError{
|
||||
Type: errorTypes.PipelineErrorTypeDeprecation,
|
||||
Message: "Secrets are deprecated, use environment with from_secret",
|
||||
Data: errors.DeprecationErrorData{
|
||||
File: config.File,
|
||||
Field: fmt.Sprintf("steps.%s.secrets", container.Name),
|
||||
Docs: "https://woodpecker-ci.org/docs/usage/secrets#usage",
|
||||
},
|
||||
IsWarning: true,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@@ -47,9 +47,11 @@ type (
|
||||
Ports []string `yaml:"ports,omitempty"`
|
||||
DependsOn base.StringOrSlice `yaml:"depends_on,omitempty"`
|
||||
|
||||
Secrets []string `yaml:"secrets,omitempty"`
|
||||
Environment map[string]any `yaml:"environment,omitempty"`
|
||||
|
||||
// Deprecated
|
||||
Secrets []string `yaml:"secrets,omitempty"`
|
||||
|
||||
// Docker and Kubernetes Specific
|
||||
Privileged bool `yaml:"privileged,omitempty"`
|
||||
|
||||
|
Reference in New Issue
Block a user