diff options
author | 2018-03-06 17:27:15 -0500 | |
---|---|---|
committer | 2018-03-07 16:38:42 -0500 | |
commit | 186a7c9014441b1bd97843e54220ecabcc863e7e (patch) | |
tree | d2c42f785785e8360b34f24d43c125ac85750c75 /conductor/docker/push-dockers.sh | |
parent | 19d220e1f87475ef762ba7f6fb39d4eb18ee4c20 (diff) |
Corrected Docker Files
Note: we've been running conductor/has using the
source distribution (sdist) Running the git glone
instead of going for the artifacts - will do the
sdist based execution soon once the blocker for
functional testing is removed.
Also, added push script for docker images.
Issue-ID: OPTFRA-123
Change-Id: I733113d217157828322ebc2464351abdc0752be6
Signed-off-by: Ikram Ikramullah (ikram@research.att.com) <ikram@research.att.com>
Diffstat (limited to 'conductor/docker/push-dockers.sh')
-rwxr-xr-x | conductor/docker/push-dockers.sh | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/conductor/docker/push-dockers.sh b/conductor/docker/push-dockers.sh new file mode 100755 index 0000000..59cb7d4 --- /dev/null +++ b/conductor/docker/push-dockers.sh @@ -0,0 +1,43 @@ +#!/bin/bash
+BUILD_ARGS="--no-cache"
+ORG="onap"
+VERSION="1.1.0"
+PROJECT="optf"
+IMAGE="api"
+DOCKER_REPOSITORY="nexus3.onap.org:10003"
+IMAGE_NAME="${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/${IMAGE}"
+TIMESTAMP=$(date +"%Y%m%dT%H%M%S")
+
+if [ $HTTP_PROXY ]; then
+BUILD_ARGS+=" --build-arg HTTP_PROXY=${HTTP_PROXY}"
+fi
+if [ $HTTPS_PROXY ]; then
+ BUILD_ARGS+=" --build-arg HTTPS_PROXY=${HTTPS_PROXY}"
+fi
+
+function tag {
+ echo "Tagging !!!"
+ docker tag api "nexus3.onap.org:10003/onap/optf/api"
+ docker tag data "nexus3.onap.org:10003/onap/optf/data"
+ docker tag controller "nexus3.onap.org:10003/onap/optf/controller"
+ docker tag solver "nexus3.onap.org:10003/onap/optf/solver"
+ docker tag reservation "nexus3.onap.org:10003/onap/optf/reservation"
+}
+
+
+function push_image {
+ echo "Start push ${IMAGE_NAME}:latest"
+
+ tag
+ docker push "nexus3.onap.org:10003/onap/optf/api"
+ docker push "nexus3.onap.org:10003/onap/optf/data"
+ docker push "nexus3.onap.org:10003/onap/optf/controller"
+ docker push "nexus3.onap.org:10003/onap/optf/solver"
+ docker push "nexus3.onap.org:10003/onap/optf/reservation"
+
+ #docker push ${IMAGE_NAME}:latest
+ #push_image_tag ${IMAGE_NAME}:${VERSION}-SNAPSHOT-latest
+ #push_image_tag ${IMAGE_NAME}:${VERSION}-STAGING-latest
+ #push_image_tag ${IMAGE_NAME}:${VERSION}-STAGING-${TIMESTAMP}
+ }
+push_image
|