+#!/bin/bash \r
+BUILD_ARGS="--no-cache" \r
+ORG="onap" \r
+VERSION="1.1.0" \r
+PROJECT="optf" \r
+IMAGE="api" \r
+DOCKER_REPOSITORY="nexus3.onap.org:10003" \r
+IMAGE_NAME="${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/${IMAGE}" \r
+TIMESTAMP=$(date +"%Y%m%dT%H%M%S") \r
+ \r
+if [ $HTTP_PROXY ]; then \r
+BUILD_ARGS+=" --build-arg HTTP_PROXY=${HTTP_PROXY}" \r
+fi \r
+if [ $HTTPS_PROXY ]; then \r
+ BUILD_ARGS+=" --build-arg HTTPS_PROXY=${HTTPS_PROXY}" \r
+fi \r
+ \r
+function tag {\r
+ echo "Tagging !!!"\r
+ docker tag api "nexus3.onap.org:10003/onap/optf/api"\r
+ docker tag data "nexus3.onap.org:10003/onap/optf/data"\r
+ docker tag controller "nexus3.onap.org:10003/onap/optf/controller"\r
+ docker tag solver "nexus3.onap.org:10003/onap/optf/solver"\r
+ docker tag reservation "nexus3.onap.org:10003/onap/optf/reservation"\r
+}\r
+\r
+\r
+function push_image { \r
+ echo "Start push ${IMAGE_NAME}:latest" \r
+ \r
+ tag\r
+ docker push "nexus3.onap.org:10003/onap/optf/api"\r
+ docker push "nexus3.onap.org:10003/onap/optf/data"\r
+ docker push "nexus3.onap.org:10003/onap/optf/controller"\r
+ docker push "nexus3.onap.org:10003/onap/optf/solver"\r
+ docker push "nexus3.onap.org:10003/onap/optf/reservation"\r
+ \r
+ #docker push ${IMAGE_NAME}:latest \r
+ #push_image_tag ${IMAGE_NAME}:${VERSION}-SNAPSHOT-latest \r
+ #push_image_tag ${IMAGE_NAME}:${VERSION}-STAGING-latest \r
+ #push_image_tag ${IMAGE_NAME}:${VERSION}-STAGING-${TIMESTAMP} \r
+ } \r
+push_image\r