blob: 94832ff53f2003cd8ea11e2f16a43321158c73a8 [file] [log] [blame]
Christopher Lott (cl778h)978dbcf2017-08-23 18:27:19 -04001#!/bin/bash
2# Builds and pushes versions of Portal images
3# Invoked by scripts that set VERSION and LATEST
4
5# be verbose
6set -x
7
8if [ -z "$VERSION" ]; then
9 echo "VERSION not set"
10 exit 1
11fi
12if [ -z "$LATEST" ]; then
13 echo "LATEST not set"
14 exit 1
15fi
16
Christopher Lott (cl778h)89cce2a2017-10-02 15:53:21 -040017# ONAP docker registry for pushing; may need to move
18# this into os_docker_push, os_docker_release scripts
19NEXUS_REPO=nexus3.onap.org:10003
20
Christopher Lott (cl778h)978dbcf2017-08-23 18:27:19 -040021# Build the containers
22./build_portalapps_dockers.sh
23
st782s8bcc6f62018-02-05 16:14:27 -050024# Establish environment variables
25source $(dirname $0)/.env
26
Kishore Reddy, Gujja (kg811t)4ee89672018-03-20 17:15:25 -040027APP_VERSION="${NEXUS_REPO}/${EP_IMG_NAME}:${VERSION}"
28SDK_VERSION="${NEXUS_REPO}/${SDK_IMG_NAME}:${VERSION}"
Christopher Lott (cl778h)89cce2a2017-10-02 15:53:21 -040029DB_VERSION="${NEXUS_REPO}/${DB_IMG_NAME}:${VERSION}"
30WMS_VERSION="${NEXUS_REPO}/${WMS_IMG_NAME}:${VERSION}"
Christopher Lott (cl778h)978dbcf2017-08-23 18:27:19 -040031
Kishore Reddy, Gujja (kg811t)4ee89672018-03-20 17:15:25 -040032APP_LATEST="${NEXUS_REPO}/${EP_IMG_NAME}:${LATEST}"
33SDK_LATEST="${NEXUS_REPO}/${SDK_IMG_NAME}:${LATEST}"
Christopher Lott (cl778h)89cce2a2017-10-02 15:53:21 -040034DB_LATEST="${NEXUS_REPO}/${DB_IMG_NAME}:${LATEST}"
35WMS_LATEST="${NEXUS_REPO}/${WMS_IMG_NAME}:${LATEST}"
Christopher Lott (cl778h)978dbcf2017-08-23 18:27:19 -040036
37# tag versions
Kishore Reddy, Gujja (kg811t)4ee89672018-03-20 17:15:25 -040038docker tag ${EP_IMG_NAME}:${PORTAL_TAG} ${APP_VERSION}
39docker tag ${EP_IMG_NAME}:${PORTAL_TAG} ${APP_LATEST}
40
41docker tag ${SDK_IMG_NAME}:${PORTAL_TAG} ${SDK_VERSION}
42docker tag ${SDK_IMG_NAME}:${PORTAL_TAG} ${SDK_LATEST}
Christopher Lott (cl778h)978dbcf2017-08-23 18:27:19 -040043
44docker tag ${DB_IMG_NAME}:${PORTAL_TAG} ${DB_VERSION}
45docker tag ${DB_IMG_NAME}:${PORTAL_TAG} ${DB_LATEST}
46
47docker tag ${WMS_IMG_NAME}:${PORTAL_TAG} ${WMS_VERSION}
48docker tag ${WMS_IMG_NAME}:${PORTAL_TAG} ${WMS_LATEST}
49
Christopher Lott (cl778h)0acb4fc2017-10-02 12:09:24 -040050# push to registry
Kishore Reddy, Gujja (kg811t)4ee89672018-03-20 17:15:25 -040051docker push ${APP_VERSION}
52docker push ${APP_LATEST}
53
54docker push ${SDK_VERSION}
55docker push ${SDK_LATEST}
Christopher Lott (cl778h)978dbcf2017-08-23 18:27:19 -040056
57docker push ${DB_VERSION}
58docker push ${DB_LATEST}
59
60docker push ${WMS_VERSION}
61docker push ${WMS_LATEST}