diff --git a/pipeline/frontend/yaml/linter/linter.go b/pipeline/frontend/yaml/linter/linter.go index bb7970f48..4b991dc41 100644 --- a/pipeline/frontend/yaml/linter/linter.go +++ b/pipeline/frontend/yaml/linter/linter.go @@ -235,20 +235,8 @@ func (l *Linter) lintSettings(config *WorkflowConfig, c *types.Container, field return nil } -func (l *Linter) lintContainerDeprecations(config *WorkflowConfig, c *types.Container, field string) (err error) { - if len(c.Secrets) != 0 { - err = multierr.Append(err, &errorTypes.PipelineError{ - Type: errorTypes.PipelineErrorTypeDeprecation, - Message: "Usage of `secrets` is deprecated, use `environment` in combination with `from_secret`", - Data: errors.DeprecationErrorData{ - File: config.File, - Field: fmt.Sprintf("%s.%s.secrets", field, c.Name), - Docs: "https://woodpecker-ci.org/docs/usage/secrets#use-secrets-in-settings-and-environment", - }, - }) - } - - return err +func (l *Linter) lintContainerDeprecations(config *WorkflowConfig, c *types.Container, field string) error { + return nil } func (l *Linter) lintTrusted(config *WorkflowConfig, c *types.Container, area string) error { diff --git a/pipeline/frontend/yaml/linter/linter_test.go b/pipeline/frontend/yaml/linter/linter_test.go index 836b44e0a..d5a5e3973 100644 --- a/pipeline/frontend/yaml/linter/linter_test.go +++ b/pipeline/frontend/yaml/linter/linter_test.go @@ -177,14 +177,6 @@ func TestLintErrors(t *testing.T) { from: "{steps: { build: { image: golang, settings: { test: 'true' } } }, when: { branch: main, event: push }, clone: { git: { image: some-other/plugin-git:v1.1.0 } } }", want: "Specified clone image does not match allow list, netrc is not injected", }, - { - from: "steps: { build: { image: golang, secrets: [ { source: mysql_username, target: mysql_username } ] } }", - want: "Usage of `secrets` is deprecated, use `environment` in combination with `from_secret`", - }, - { - from: "steps: { build: { image: golang, secrets: [ 'mysql_username' ] } }", - want: "Usage of `secrets` is deprecated, use `environment` in combination with `from_secret`", - }, { from: "steps: { build: { image: golang }, publish: { image: golang, depends_on: [ binary ] } }", want: "One or more of the specified dependencies do not exist", diff --git a/pipeline/frontend/yaml/types/container.go b/pipeline/frontend/yaml/types/container.go index 1fc333d27..e6356fb77 100644 --- a/pipeline/frontend/yaml/types/container.go +++ b/pipeline/frontend/yaml/types/container.go @@ -57,9 +57,6 @@ type ( // ACTIVE DEVELOPMENT BELOW - // Remove after v3.1.0 - Secrets []any `yaml:"secrets,omitempty"` - // Docker and Kubernetes Specific Privileged bool `yaml:"privileged,omitempty"` @@ -127,8 +124,7 @@ func (c ContainerList) MarshalYAML() (any, error) { func (c *Container) IsPlugin() bool { return len(c.Commands) == 0 && len(c.Entrypoint) == 0 && - len(c.Environment) == 0 && - len(c.Secrets) == 0 + len(c.Environment) == 0 } func (c *Container) IsTrustedCloneImage(trustedClonePlugins []string) bool {