Add "woodpeckerci/plugin-docker-buildx" to privileged plugins (#623)

* refactor global const in own package

* add "woodpeckerci/plugin-docker-buildx" to privileged plugins

* add woodpeckerci/plugin-docker
This commit is contained in:
6543 2021-12-19 12:46:36 +01:00 committed by GitHub
parent ef597eca0c
commit e8807c5e53
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 10 deletions

View file

@ -18,6 +18,8 @@ import (
"time" "time"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v2"
"github.com/woodpecker-ci/woodpecker/shared/constant"
) )
var flags = []cli.Flag{ var flags = []cli.Flag{
@ -53,11 +55,7 @@ var flags = []cli.Flag{
&cli.StringSliceFlag{ &cli.StringSliceFlag{
Name: "privileged", Name: "privileged",
Usage: "privileged plugins", Usage: "privileged plugins",
Value: cli.NewStringSlice( Value: cli.NewStringSlice(constant.PrivilegedPlugins...),
"plugins/docker",
"plugins/gcr",
"plugins/ecr",
),
}, },
// //

View file

@ -18,6 +18,8 @@ import (
"time" "time"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v2"
"github.com/woodpecker-ci/woodpecker/shared/constant"
) )
var flags = []cli.Flag{ var flags = []cli.Flag{
@ -115,11 +117,7 @@ var flags = []cli.Flag{
EnvVars: []string{"WOODPECKER_ESCALATE"}, EnvVars: []string{"WOODPECKER_ESCALATE"},
Name: "escalate", Name: "escalate",
Usage: "images to run in privileged mode", Usage: "images to run in privileged mode",
Value: cli.NewStringSlice( Value: cli.NewStringSlice(constant.PrivilegedPlugins...),
"plugins/docker",
"plugins/gcr",
"plugins/ecr",
),
}, },
&cli.StringSliceFlag{ &cli.StringSliceFlag{
EnvVars: []string{"WOODPECKER_VOLUME"}, EnvVars: []string{"WOODPECKER_VOLUME"},

View file

@ -0,0 +1,9 @@
package constant
var PrivilegedPlugins = []string{
"plugins/docker",
"plugins/gcr",
"plugins/ecr",
"woodpeckerci/plugin-docker",
"woodpeckerci/plugin-docker-buildx",
}