diff options
Diffstat (limited to 'push-dockers.sh')
-rwxr-xr-x | push-dockers.sh | 85 |
1 files changed, 42 insertions, 43 deletions
diff --git a/push-dockers.sh b/push-dockers.sh index 59cb7d4..f67944e 100755 --- a/push-dockers.sh +++ b/push-dockers.sh @@ -1,43 +1,42 @@ -#!/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
+#!/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 |