diff --git a/build/lifecycle_test.go b/build/lifecycle_test.go index 0f04ceb29..5074089d1 100644 --- a/build/lifecycle_test.go +++ b/build/lifecycle_test.go @@ -145,6 +145,9 @@ func testLifecycle(t *testing.T, when spec.G, it spec.S) { h.AssertContains(t, outBuf.String(), "HTTP_PROXY=some-http-proxy") h.AssertContains(t, outBuf.String(), "HTTPS_PROXY=some-https-proxy") h.AssertContains(t, outBuf.String(), "NO_PROXY=some-no-proxy") + h.AssertContains(t, outBuf.String(), "http_proxy=some-http-proxy") + h.AssertContains(t, outBuf.String(), "https_proxy=some-https-proxy") + h.AssertContains(t, outBuf.String(), "no_proxy=some-no-proxy") }) when("#WithArgs", func() { diff --git a/build/phase.go b/build/phase.go index bc09dbf8f..586cd152a 100644 --- a/build/phase.go +++ b/build/phase.go @@ -55,12 +55,15 @@ func (l *Lifecycle) NewPhase(name string, ops ...func(*Phase) (*Phase, error)) ( if l.httpProxy != "" { phase.ctrConf.Env = append(phase.ctrConf.Env, "HTTP_PROXY="+l.httpProxy) + phase.ctrConf.Env = append(phase.ctrConf.Env, "http_proxy="+l.httpProxy) } if l.httpsProxy != "" { phase.ctrConf.Env = append(phase.ctrConf.Env, "HTTPS_PROXY="+l.httpsProxy) + phase.ctrConf.Env = append(phase.ctrConf.Env, "https_proxy="+l.httpsProxy) } if l.noProxy != "" { phase.ctrConf.Env = append(phase.ctrConf.Env, "NO_PROXY="+l.noProxy) + phase.ctrConf.Env = append(phase.ctrConf.Env, "no_proxy="+l.noProxy) } var err error diff --git a/build/testdata/fake-lifecycle/phase.go b/build/testdata/fake-lifecycle/phase.go index 1018c354a..f6bee7d95 100644 --- a/build/testdata/fake-lifecycle/phase.go +++ b/build/testdata/fake-lifecycle/phase.go @@ -139,6 +139,9 @@ func testProxy() { fmt.Println("HTTP_PROXY="+os.Getenv("HTTP_PROXY")) fmt.Println("HTTPS_PROXY="+os.Getenv("HTTPS_PROXY")) fmt.Println("NO_PROXY="+os.Getenv("NO_PROXY")) + fmt.Println("http_proxy="+os.Getenv("http_proxy")) + fmt.Println("https_proxy="+os.Getenv("https_proxy")) + fmt.Println("no_proxy="+os.Getenv("no_proxy")) } func testBinds() {