diff --git a/cli/secret/secret_add.go b/cli/secret/secret_add.go index 18164aafd..1637edfe4 100644 --- a/cli/secret/secret_add.go +++ b/cli/secret/secret_add.go @@ -46,11 +46,11 @@ var secretCreateCmd = &cli.Command{ Usage: "secret value", }, &cli.StringSliceFlag{ - Name: "events", + Name: "event", Usage: "secret limited to these events", }, &cli.StringSliceFlag{ - Name: "images", + Name: "image", Usage: "secret limited to these images", }, ), @@ -65,8 +65,8 @@ func secretCreate(c *cli.Context) error { secret := &woodpecker.Secret{ Name: strings.ToLower(c.String("name")), Value: c.String("value"), - Images: c.StringSlice("images"), - Events: c.StringSlice("events"), + Images: c.StringSlice("image"), + Events: c.StringSlice("event"), } if len(secret.Events) == 0 { secret.Events = defaultSecretEvents diff --git a/cli/secret/secret_set.go b/cli/secret/secret_set.go index 691beb9a3..485f11c11 100644 --- a/cli/secret/secret_set.go +++ b/cli/secret/secret_set.go @@ -46,11 +46,11 @@ var secretUpdateCmd = &cli.Command{ Usage: "secret value", }, &cli.StringSliceFlag{ - Name: "events", + Name: "event", Usage: "secret limited to these events", }, &cli.StringSliceFlag{ - Name: "images", + Name: "image", Usage: "secret limited to these images", }, ), @@ -65,8 +65,8 @@ func secretUpdate(c *cli.Context) error { secret := &woodpecker.Secret{ Name: strings.ToLower(c.String("name")), Value: c.String("value"), - Images: c.StringSlice("images"), - Events: c.StringSlice("events"), + Images: c.StringSlice("image"), + Events: c.StringSlice("event"), } if strings.HasPrefix(secret.Value, "@") { path := strings.TrimPrefix(secret.Value, "@") diff --git a/docs/docs/91-migrations.md b/docs/docs/91-migrations.md index fbb760518..bd68a6c01 100644 --- a/docs/docs/91-migrations.md +++ b/docs/docs/91-migrations.md @@ -6,7 +6,7 @@ Some versions need some changes to the server configuration or the pipeline conf - Dropped deprecated `CI_BUILD_*`, `CI_PREV_BUILD_*`, `CI_JOB_*`, `*_LINK`, `CI_SYSTEM_ARCH`, `CI_REPO_REMOTE` built-in environment variables - Deprecated `platform:` filter in favor of `labels:`, [read more](./20-usage/20-workflow-syntax.md#filter-by-platform) -- Secrets `event` property was renamed to `events` and `image` to `images` as both are lists. The new property `events` / `images` has to be used in the api and as cli argument. The old properties `event` and `image` were removed. +- Secrets `event` property was renamed to `events` and `image` to `images` as both are lists. The new property `events` / `images` has to be used in the api. The old properties `event` and `image` were removed. - The secrets `plugin_only` option was removed. Secrets with images are now always only available for plugins using listed by the `images` property. Existing secrets with a list of `images` will now only be available to the listed images if they are used as a plugin. - Removed `build` alias for `pipeline` command in CLI - Removed `ssh` backend. Use an agent directly on the SSH machine using the `local` backend.