Christopher Lott (cl778h) | 978dbcf | 2017-08-23 18:27:19 -0400 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | # Builds and pushes versions of Portal images |
| 3 | # Invoked by scripts that set VERSION and LATEST |
| 4 | |
| 5 | # be verbose |
| 6 | set -x |
| 7 | |
| 8 | if [ -z "$VERSION" ]; then |
| 9 | echo "VERSION not set" |
| 10 | exit 1 |
| 11 | fi |
| 12 | if [ -z "$LATEST" ]; then |
| 13 | echo "LATEST not set" |
| 14 | exit 1 |
| 15 | fi |
| 16 | |
Christopher Lott (cl778h) | 89cce2a | 2017-10-02 15:53:21 -0400 | [diff] [blame] | 17 | # ONAP docker registry for pushing; may need to move |
| 18 | # this into os_docker_push, os_docker_release scripts |
| 19 | NEXUS_REPO=nexus3.onap.org:10003 |
| 20 | |
Christopher Lott (cl778h) | 978dbcf | 2017-08-23 18:27:19 -0400 | [diff] [blame] | 21 | # Build the containers |
| 22 | ./build_portalapps_dockers.sh |
| 23 | |
st782s | 8bcc6f6 | 2018-02-05 16:14:27 -0500 | [diff] [blame] | 24 | # Establish environment variables |
| 25 | source $(dirname $0)/.env |
| 26 | |
Kishore Reddy, Gujja (kg811t) | 4ee8967 | 2018-03-20 17:15:25 -0400 | [diff] [blame] | 27 | APP_VERSION="${NEXUS_REPO}/${EP_IMG_NAME}:${VERSION}" |
| 28 | SDK_VERSION="${NEXUS_REPO}/${SDK_IMG_NAME}:${VERSION}" |
Christopher Lott (cl778h) | 89cce2a | 2017-10-02 15:53:21 -0400 | [diff] [blame] | 29 | DB_VERSION="${NEXUS_REPO}/${DB_IMG_NAME}:${VERSION}" |
| 30 | WMS_VERSION="${NEXUS_REPO}/${WMS_IMG_NAME}:${VERSION}" |
Christopher Lott (cl778h) | 978dbcf | 2017-08-23 18:27:19 -0400 | [diff] [blame] | 31 | |
Kishore Reddy, Gujja (kg811t) | 4ee8967 | 2018-03-20 17:15:25 -0400 | [diff] [blame] | 32 | APP_LATEST="${NEXUS_REPO}/${EP_IMG_NAME}:${LATEST}" |
| 33 | SDK_LATEST="${NEXUS_REPO}/${SDK_IMG_NAME}:${LATEST}" |
Christopher Lott (cl778h) | 89cce2a | 2017-10-02 15:53:21 -0400 | [diff] [blame] | 34 | DB_LATEST="${NEXUS_REPO}/${DB_IMG_NAME}:${LATEST}" |
| 35 | WMS_LATEST="${NEXUS_REPO}/${WMS_IMG_NAME}:${LATEST}" |
Christopher Lott (cl778h) | 978dbcf | 2017-08-23 18:27:19 -0400 | [diff] [blame] | 36 | |
| 37 | # tag versions |
Kishore Reddy, Gujja (kg811t) | 4ee8967 | 2018-03-20 17:15:25 -0400 | [diff] [blame] | 38 | docker tag ${EP_IMG_NAME}:${PORTAL_TAG} ${APP_VERSION} |
| 39 | docker tag ${EP_IMG_NAME}:${PORTAL_TAG} ${APP_LATEST} |
| 40 | |
| 41 | docker tag ${SDK_IMG_NAME}:${PORTAL_TAG} ${SDK_VERSION} |
| 42 | docker tag ${SDK_IMG_NAME}:${PORTAL_TAG} ${SDK_LATEST} |
Christopher Lott (cl778h) | 978dbcf | 2017-08-23 18:27:19 -0400 | [diff] [blame] | 43 | |
| 44 | docker tag ${DB_IMG_NAME}:${PORTAL_TAG} ${DB_VERSION} |
| 45 | docker tag ${DB_IMG_NAME}:${PORTAL_TAG} ${DB_LATEST} |
| 46 | |
| 47 | docker tag ${WMS_IMG_NAME}:${PORTAL_TAG} ${WMS_VERSION} |
| 48 | docker tag ${WMS_IMG_NAME}:${PORTAL_TAG} ${WMS_LATEST} |
| 49 | |
Christopher Lott (cl778h) | 0acb4fc | 2017-10-02 12:09:24 -0400 | [diff] [blame] | 50 | # push to registry |
Kishore Reddy, Gujja (kg811t) | 4ee8967 | 2018-03-20 17:15:25 -0400 | [diff] [blame] | 51 | docker push ${APP_VERSION} |
| 52 | docker push ${APP_LATEST} |
| 53 | |
| 54 | docker push ${SDK_VERSION} |
| 55 | docker push ${SDK_LATEST} |
Christopher Lott (cl778h) | 978dbcf | 2017-08-23 18:27:19 -0400 | [diff] [blame] | 56 | |
| 57 | docker push ${DB_VERSION} |
| 58 | docker push ${DB_LATEST} |
| 59 | |
| 60 | docker push ${WMS_VERSION} |
| 61 | docker push ${WMS_LATEST} |