X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=deliveries%2Fos_docker_push.sh;h=0978ad834412c551a1b72c976d5e532eacdc2b41;hb=83de9db899ebf7ec87220670d6f5cf35a10d087b;hp=2c41151da6d5ebb913924450a1471ce477e65a02;hpb=cc805e781c5c764860a1f801e637c6ed6e471f63;p=portal.git diff --git a/deliveries/os_docker_push.sh b/deliveries/os_docker_push.sh index 2c41151d..0978ad83 100755 --- a/deliveries/os_docker_push.sh +++ b/deliveries/os_docker_push.sh @@ -1,40 +1,23 @@ #!/bin/bash +# Builds and pushes SNAPSHOT versions of Portal images -# Establish environment variables -source $(dirname $0)/os_settings.sh +# be verbose +set -x -./run.sh +# Establish environment variables +source $(dirname $0)/.env -REPO="nexus3.onap.org:10003" +if [ -z "$PORTAL_VERSION" ]; then + echo "PORTAL_VERSION not set" + exit 1 +fi 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}" -WMS_VERSION="${REPO}/openecomp/portalwms:${VERSION}" - -APPS_LATEST="${REPO}/openecomp/portalapps:${LATEST}" -DB_LATEST="${REPO}/openecomp/portaldb:${LATEST}" -WMS_LATEST="${REPO}/openecomp/portalwms:${LATEST}" - -# tag versions -docker tag ${EP_IMG_NAME} ${APPS_VERSION} -docker tag ${EP_IMG_NAME} ${APPS_LATEST} - -docker tag ${DB_IMG_NAME} ${DB_VERSION} -docker tag ${DB_IMG_NAME} ${DB_LATEST} - -docker tag ${WMS_IMG_NAME} ${WMS_VERSION} -docker tag ${WMS_IMG_NAME} ${WMS_LATEST} - -# push -docker push ${APPS_VERSION} -docker push ${APPS_LATEST} +# commenting the following two configurations as lf team preferred the uncommented format below +#export VERSION="${PORTAL_VERSION}-${TIMESTAMP}" +#export LATEST="latest" -docker push ${DB_VERSION} -docker push ${DB_LATEST} +export VERSION="${PORTAL_VERSION}-STAGING-${TIMESTAMP}" +export LATEST="${PORTAL_VERSION}-STAGING-latest" -docker push ${WMS_VERSION} -docker push ${WMS_LATEST} +exec ./os_docker_base.sh