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"
"github.com/urfave/cli/v2"
"github.com/woodpecker-ci/woodpecker/shared/constant"
)
var flags = []cli.Flag{
@ -53,11 +55,7 @@ var flags = []cli.Flag{
&cli.StringSliceFlag{
Name: "privileged",
Usage: "privileged plugins",
Value: cli.NewStringSlice(
"plugins/docker",
"plugins/gcr",
"plugins/ecr",
),
Value: cli.NewStringSlice(constant.PrivilegedPlugins...),
},
//

View file

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