Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 2 additions & 14 deletions pipeline/frontend/yaml/linter/linter.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
8 changes: 0 additions & 8 deletions pipeline/frontend/yaml/linter/linter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
6 changes: 1 addition & 5 deletions pipeline/frontend/yaml/types/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`

Expand Down Expand Up @@ -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 {
Expand Down