mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-23 00:46:30 +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"
|
||||
|
||||
"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...),
|
||||
},
|
||||
|
||||
//
|
||||
|
|
|
@ -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"},
|
||||
|
|
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