diff options
-rwxr-xr-x | docker_build.sh | 4 | ||||
-rwxr-xr-x | docker_merge.sh | 10 | ||||
-rwxr-xr-x | docker_verify.sh | 10 |
3 files changed, 19 insertions, 5 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 diff --git a/docker_merge.sh b/docker_merge.sh index bbc0ca92..83fd239d 100755 --- a/docker_merge.sh +++ b/docker_merge.sh @@ -5,6 +5,14 @@ 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) +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}" +fi echo $DOCKER_REPOSITORY echo $MVN_VERSION @@ -55,7 +63,7 @@ for image in policy-os policy-nexus policy-db policy-base policy-drools policy-p echo $TAGS - docker build --quiet $TAGS target/$image + docker build --quiet ${PROXY_ARGS} $TAGS target/$image if [ $? -ne 0 ] then diff --git a/docker_verify.sh b/docker_verify.sh index cdb42e9d..17eff0a1 100755 --- a/docker_verify.sh +++ b/docker_verify.sh @@ -8,6 +8,14 @@ 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) +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}" +fi echo $DOCKER_REPOSITORY echo $MVN_VERSION @@ -58,7 +66,7 @@ for image in policy-os policy-nexus policy-db policy-base policy-drools policy-p echo $TAGS - docker build --quiet $TAGS target/$image + docker build --quiet ${PROXY_ARGS} $TAGS target/$image if [ $? -ne 0 ] then |