mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-10-21 21:44:08 +00:00
Add support for default clone image environment variable (#769)
This allows for custom clone images for deployment in air-gap systems. Co-authored-by: Zav Shotan <zshotan@bloomberg.net>
This commit is contained in:
@@ -96,6 +96,12 @@ var flags = []cli.Flag{
|
||||
Name: "authenticate-public-repos",
|
||||
Usage: "Always use authentication to clone repositories even if they are public. Needed if the SCM requires to always authenticate as used by many companies.",
|
||||
},
|
||||
&cli.StringFlag{
|
||||
EnvVars: []string{"WOODPECKER_DEFAULT_CLONE_IMAGE"},
|
||||
Name: "default-clone-image",
|
||||
Usage: "The default docker image to be used when cloning the repo",
|
||||
Value: "woodpeckerci/plugin-git:latest",
|
||||
},
|
||||
&cli.StringFlag{
|
||||
EnvVars: []string{"WOODPECKER_DOCS"},
|
||||
Name: "docs",
|
||||
|
@@ -274,6 +274,9 @@ func setupEvilGlobals(c *cli.Context, v store.Store, r remote.Remote) {
|
||||
// authentication
|
||||
server.Config.Pipeline.AuthenticatePublicRepos = c.Bool("authenticate-public-repos")
|
||||
|
||||
// Cloning
|
||||
server.Config.Pipeline.DefaultCloneImage = c.String("default-clone-image")
|
||||
|
||||
// limits
|
||||
server.Config.Pipeline.Limits.MemSwapLimit = c.Int64("limit-mem-swap")
|
||||
server.Config.Pipeline.Limits.MemLimit = c.Int64("limit-mem")
|
||||
|
Reference in New Issue
Block a user