aboutsummaryrefslogtreecommitdiffstats
path: root/docker_build.sh
diff options
context:
space:
mode:
authorShashank Kumar Shankar <shashank.kumar.shankar@intel.com>2017-06-29 12:52:59 -0700
committerShashank Kumar Shankar <shashank.kumar.shankar@intel.com>2017-06-29 21:53:53 +0000
commit6e36eec11cef53beeaa7dffbd7af83ee0ab1b139 (patch)
tree5204c2b50500227b865e0003c70ba825dace991d /docker_build.sh
parent3e5a0c35447d8699dfef7308fa6a3dc287bc0a64 (diff)
[POLICY-54] Add proxy for docker builds and fixes
This patch helps to build Policy docker images behind a proxy and fixes the following correction in patch https://gerrit.onap.org/r/#/c/5585/ : 1. $HTTP_PROXY and $HTTPS_PROXY environment variables gets reset with HTTP_PROXY="" and HTTP_PROXY="" overriding it. 2. When both $HTTP_PROXY and $HTTPS_PROXY are set, a space is needed when they are appended for providing correct arguments to docker build command. Change-Id: I1d0f2003c77444e372b754d42f20d2e428e70a95 Signed-off-by: Shashank Kumar Shankar <shashank.kumar.shankar@intel.com>
Diffstat (limited to 'docker_build.sh')
-rwxr-xr-xdocker_build.sh4
1 files changed, 1 insertions, 3 deletions
diff --git a/docker_build.sh b/docker_build.sh
index 746f7101..4a8c416f 100755
--- a/docker_build.sh
+++ b/docker_build.sh
@@ -5,15 +5,13 @@ DOCKER_REPOSITORY=nexus3.onap.org:10003
MVN_VERSION=$(cat target/version)
MVN_MAJMIN_VERSION=$(cut -f 1,2 -d . target/version)
TIMESTAMP=$(date -u +%Y%m%dT%H%M%S)
-HTTP_PROXY=""
-HTTPS_PROXY=""
PROXY_ARGS=""
if [ $HTTP_PROXY ]; then
PROXY_ARGS+="--build-arg HTTP_PROXY=${HTTP_PROXY}"
fi
if [ $HTTPS_PROXY ]; then
- PROXY_ARGS+="--build-arg HTTPS_PROXY=${HTTPS_PROXY}"
+ PROXY_ARGS+=" --build-arg HTTPS_PROXY=${HTTPS_PROXY}"
fi
echo $DOCKER_REPOSITORY