mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-26 20:01:02 +00:00
get lowercase http_proxy env variables
This commit is contained in:
parent
a4eee9e510
commit
98e959095f
4 changed files with 9 additions and 13 deletions
2
docs/build/secrets.md
vendored
2
docs/build/secrets.md
vendored
|
@ -1,6 +1,6 @@
|
|||
# Secret Variables
|
||||
|
||||
> **Caution:** this feature is still considered experimental
|
||||
> this feature is still considered experimental
|
||||
|
||||
Drone allows you to store secret variables in an encrypted `.drone.sec` file in the root of your repository. This is useful when your build requires sensitive information that should not be stored in plaintext in your `.drone.yml` file.
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
> **NOTE** we are not yet producing an image for 0.4 so this section does not work as documented. An official image for the 0.4 release is coming soon
|
||||
|
||||
# Installation
|
||||
|
||||
To quickly tryout Drone we have a [Docker image](https://registry.hub.docker.com/u/drone/drone/) that includes everything you need to get started. Simply run the commend below:
|
||||
|
@ -8,7 +6,7 @@ To quickly tryout Drone we have a [Docker image](https://registry.hub.docker.com
|
|||
sudo docker run \
|
||||
--volume /var/lib/drone:/var/lib/drone \
|
||||
--volume /var/run/docker.sock:/var/run/docker.sock \
|
||||
--env-file /etc/defaults/drone \
|
||||
--env-file /etc/drone/dronerc \
|
||||
--restart=always \
|
||||
--publish=80:8000 \
|
||||
--detach=true \
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
> **Caution** the mysql driver has known timeout issues. See [#257](https://github.com/go-sql-driver/mysql/issues/257).
|
||||
> mysql driver has known timeout issues. See [#257](https://github.com/go-sql-driver/mysql/issues/257).
|
||||
|
||||
# MySQL
|
||||
|
||||
|
|
|
@ -70,14 +70,12 @@ func Load(db *sql.DB, env envconfig.Env, remote remote.Remote) Engine {
|
|||
|
||||
// quick fix to propogate HTTP_PROXY variables
|
||||
// throughout the build environment.
|
||||
if env := env.Get("HTTP_PROXY"); len(env) != 0 {
|
||||
engine.envs = append(engine.envs, "HTTP_PROXY="+env)
|
||||
var proxyVars = []string{"HTTP_PROXY", "http_proxy", "HTTPS_PROXY", "https_proxy", "NO_PROXY", "no_proxy"}
|
||||
for _, proxyVar := range proxyVars {
|
||||
proxyVal := env.Get(proxyVar)
|
||||
if len(proxyVal) != 0 {
|
||||
engine.envs = append(engine.envs, proxyVar+"="+proxyVal)
|
||||
}
|
||||
if env := env.Get("HTTPS_PROXY"); len(env) != 0 {
|
||||
engine.envs = append(engine.envs, "HTTPS_PROXY="+env)
|
||||
}
|
||||
if env := env.Get("NO_PROXY"); len(env) != 0 {
|
||||
engine.envs = append(engine.envs, "NO_PROXY="+env)
|
||||
}
|
||||
|
||||
nodes, err := model.GetNodeList(db)
|
||||
|
|
Loading…
Reference in a new issue