X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=deliveries%2Fos_docker_push.sh;h=0978ad834412c551a1b72c976d5e532eacdc2b41;hb=83de9db899ebf7ec87220670d6f5cf35a10d087b;hp=04e245cd3790f12ab13ad5549fc548c7ca9c350b;hpb=6771b0e2bf6b0df221c920466a495e84e83a44f5;p=portal.git diff --git a/deliveries/os_docker_push.sh b/deliveries/os_docker_push.sh index 04e245cd..0978ad83 100755 --- a/deliveries/os_docker_push.sh +++ b/deliveries/os_docker_push.sh @@ -1,27 +1,23 @@ #!/bin/bash +# Builds and pushes SNAPSHOT versions of Portal images -./run.sh +# be verbose +set -x -REPO="nexus3.onap.org:10003" +# Establish environment variables +source $(dirname $0)/.env -TIMESTAMP=$(date +%C%y%m%dT%H%M%S) -VERSION="1.1.0-SNAPSHOT-${TIMESTAMP}" -LATEST="latest" - -APPS_VERSION="${REPO}/openecomp/portalapps:${VERSION}" -DB_VERSION="${REPO}/openecomp/portaldb:${VERSION}" +if [ -z "$PORTAL_VERSION" ]; then + echo "PORTAL_VERSION not set" + exit 1 +fi -APPS_LATEST="${REPO}/openecomp/portalapps:${LATEST}" -DB_LATEST="${REPO}/openecomp/portaldb:${LATEST}" +TIMESTAMP=$(date +%C%y%m%dT%H%M%S) +# commenting the following two configurations as lf team preferred the uncommented format below +#export VERSION="${PORTAL_VERSION}-${TIMESTAMP}" +#export LATEST="latest" -# tag version -docker tag ep:1610-1 ${APPS_VERSION} -docker tag ecompdb:portal ${DB_VERSION} -docker tag ep:1610-1 ${APPS_LATEST} -docker tag ecompdb:portal ${DB_LATEST} +export VERSION="${PORTAL_VERSION}-STAGING-${TIMESTAMP}" +export LATEST="${PORTAL_VERSION}-STAGING-latest" -# push -docker push ${APPS_VERSION} -docker push ${DB_VERSION} -docker push ${APPS_LATEST} -docker push ${DB_LATEST} +exec ./os_docker_base.sh