Merge branch 'origin/main' into 'next-release/main'

This commit is contained in:
oauth
2026-01-18 20:49:32 +00:00
3 changed files with 3 additions and 27 deletions

View File

@@ -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 {

View File

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

View File

@@ -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 {