mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-22 18:01:02 +00:00
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:
parent
ef597eca0c
commit
e8807c5e53
3 changed files with 15 additions and 10 deletions
|
@ -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",
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
|
@ -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"},
|
||||||
|
|
9
shared/constant/privileged_plugins.go
Normal file
9
shared/constant/privileged_plugins.go
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
package constant
|
||||||
|
|
||||||
|
var PrivilegedPlugins = []string{
|
||||||
|
"plugins/docker",
|
||||||
|
"plugins/gcr",
|
||||||
|
"plugins/ecr",
|
||||||
|
"woodpeckerci/plugin-docker",
|
||||||
|
"woodpeckerci/plugin-docker-buildx",
|
||||||
|
}
|
Loading…
Reference in a new issue