summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDylan Griffith <dyl.griffith@gmail.com>2018-08-13 11:40:18 +0100
committerDylan Griffith <dyl.griffith@gmail.com>2018-08-13 11:48:08 +0100
commitd1787d476f9e36056053b611f26b218cd0f6a0e8 (patch)
treede0b08cbd685a07b6eedc28ad95673a6a7612005
parent456a4ddebc28f1ee5f9ed595bad0e2224b20848f (diff)
downloadgitlab-ce-d1787d476f9e36056053b611f26b218cd0f6a0e8.tar.gz
Vendor Auto-DevOps.gitlab-ci.yml with new proxy env vars passed through to docker
See https://gitlab.com/gitlab-org/gitlab-ci-yml/merge_requests/184 Thanks to @kinolaev for this contribution.
-rw-r--r--changelogs/unreleased/50243-auto-devops-behind-a-proxy.yml6
-rw-r--r--vendor/gitlab-ci-yml/Auto-DevOps.gitlab-ci.yml23
2 files changed, 27 insertions, 2 deletions
diff --git a/changelogs/unreleased/50243-auto-devops-behind-a-proxy.yml b/changelogs/unreleased/50243-auto-devops-behind-a-proxy.yml
new file mode 100644
index 00000000000..0f6208d0c7a
--- /dev/null
+++ b/changelogs/unreleased/50243-auto-devops-behind-a-proxy.yml
@@ -0,0 +1,6 @@
+---
+title: Vendor Auto-DevOps.gitlab-ci.yml with new proxy env vars passed through to
+ docker
+merge_request: 21159
+author: kinolaev
+type: added
diff --git a/vendor/gitlab-ci-yml/Auto-DevOps.gitlab-ci.yml b/vendor/gitlab-ci-yml/Auto-DevOps.gitlab-ci.yml
index b698248bc38..dae80c6542d 100644
--- a/vendor/gitlab-ci-yml/Auto-DevOps.gitlab-ci.yml
+++ b/vendor/gitlab-ci-yml/Auto-DevOps.gitlab-ci.yml
@@ -720,10 +720,29 @@ rollout 100%:
if [[ -f Dockerfile ]]; then
echo "Building Dockerfile-based application..."
- docker build -t "$CI_APPLICATION_REPOSITORY:$CI_APPLICATION_TAG" .
+ docker build \
+ --build-arg HTTP_PROXY="$HTTP_PROXY" \
+ --build-arg http_proxy="$http_proxy" \
+ --build-arg HTTPS_PROXY="$HTTPS_PROXY" \
+ --build-arg https_proxy="$https_proxy" \
+ --build-arg FTP_PROXY="$FTP_PROXY" \
+ --build-arg ftp_proxy="$ftp_proxy" \
+ --build-arg NO_PROXY="$NO_PROXY" \
+ --build-arg no_proxy="$no_proxy" \
+ -t "$CI_APPLICATION_REPOSITORY:$CI_APPLICATION_TAG" .
else
echo "Building Heroku-based application using gliderlabs/herokuish docker image..."
- docker run -i -e BUILDPACK_URL --name="$CI_CONTAINER_NAME" -v "$(pwd):/tmp/app:ro" gliderlabs/herokuish /bin/herokuish buildpack build
+ docker run -i \
+ -e BUILDPACK_URL \
+ -e HTTP_PROXY \
+ -e http_proxy \
+ -e HTTPS_PROXY \
+ -e https_proxy \
+ -e FTP_PROXY \
+ -e ftp_proxy \
+ -e NO_PROXY \
+ -e no_proxy \
+ --name="$CI_CONTAINER_NAME" -v "$(pwd):/tmp/app:ro" gliderlabs/herokuish /bin/herokuish buildpack build
docker commit "$CI_CONTAINER_NAME" "$CI_APPLICATION_REPOSITORY:$CI_APPLICATION_TAG"
docker rm "$CI_CONTAINER_NAME" >/dev/null
echo ""