mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-25 11:21:02 +00:00
bump version number, auto-pull new plugins, process http_proxy vars
This commit is contained in:
parent
56b6eb1b0c
commit
a6e9c215ec
3 changed files with 28 additions and 5 deletions
|
@ -117,7 +117,7 @@ var AgentCmd = cli.Command{
|
|||
Value: "plugins",
|
||||
Usage: "default plugin image namespace",
|
||||
},
|
||||
cli.BoolFlag{
|
||||
cli.BoolTFlag{
|
||||
EnvVar: "DRONE_PLUGIN_PULL",
|
||||
Name: "pull",
|
||||
Usage: "always pull latest plugin images",
|
||||
|
@ -172,7 +172,7 @@ func start(c *cli.Context) {
|
|||
timeout: c.Duration("timeout"),
|
||||
namespace: c.String("namespace"),
|
||||
privileged: c.StringSlice("privileged"),
|
||||
pull: c.Bool("pull"),
|
||||
pull: c.BoolT("pull"),
|
||||
logs: int64(c.Int("max-log-size")) * 1000000,
|
||||
},
|
||||
}
|
||||
|
|
|
@ -6,9 +6,9 @@ var (
|
|||
// VersionMajor is for an API incompatible changes
|
||||
VersionMajor = 0
|
||||
// VersionMinor is for functionality in a backwards-compatible manner
|
||||
VersionMinor = 4
|
||||
VersionMinor = 5
|
||||
// VersionPatch is for backwards-compatible bug fixes
|
||||
VersionPatch = 1
|
||||
VersionPatch = 0
|
||||
|
||||
// VersionDev indicates development branch. Releases will be empty string.
|
||||
VersionDev = "dev"
|
||||
|
|
|
@ -1,6 +1,17 @@
|
|||
package transform
|
||||
|
||||
import "github.com/drone/drone/yaml"
|
||||
import (
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/drone/drone/yaml"
|
||||
)
|
||||
|
||||
var (
|
||||
httpProxy = os.Getenv("HTTP_PROXY")
|
||||
httpsProxy = os.Getenv("HTTPS_PROXY")
|
||||
noProxy = os.Getenv("NO_PROXY")
|
||||
)
|
||||
|
||||
// Environ transforms the steps in the Yaml pipeline to include runtime
|
||||
// environment variables.
|
||||
|
@ -15,6 +26,18 @@ func Environ(c *yaml.Config, envs map[string]string) error {
|
|||
}
|
||||
p.Environment[k] = v
|
||||
}
|
||||
if httpProxy != "" {
|
||||
p.Environment["HTTP_PROXY"] = httpProxy
|
||||
p.Environment["http_proxy"] = strings.ToUpper(httpProxy)
|
||||
}
|
||||
if httpsProxy != "" {
|
||||
p.Environment["HTTPS_PROXY"] = httpsProxy
|
||||
p.Environment["https_proxy"] = strings.ToUpper(httpsProxy)
|
||||
}
|
||||
if noProxy != "" {
|
||||
p.Environment["NO_PROXY"] = noProxy
|
||||
p.Environment["no_proxy"] = strings.ToUpper(noProxy)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue