Revert to singular CLI args (#2820)

revert parts of https://github.com/woodpecker-ci/woodpecker/pull/2213
This commit is contained in:
qwerty287 2023-11-14 17:03:41 +01:00 committed by GitHub
parent 4ab6cea761
commit 451b71dcd4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 9 deletions

View file

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

View file

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

View file

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