Skip to content

Commit

Permalink
Revert to singular CLI args (woodpecker-ci#2820)
Browse files Browse the repository at this point in the history
revert parts of woodpecker-ci#2213
  • Loading branch information
qwerty287 authored Nov 14, 2023
1 parent 4ab6cea commit 451b71d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions cli/secret/secret_add.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
},
),
Expand All @@ -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
Expand Down
8 changes: 4 additions & 4 deletions cli/secret/secret_set.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
},
),
Expand All @@ -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, "@")
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/91-migrations.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 451b71d

Please sign in to comment.