Security/ Package Name changes
[portal.git] / deliveries / os_docker_base.sh
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
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
21 # Build the containers
22 ./build_portalapps_dockers.sh
23
24 APPS_VERSION="${NEXUS_REPO}/${EP_IMG_NAME}:${VERSION}"
25 DB_VERSION="${NEXUS_REPO}/${DB_IMG_NAME}:${VERSION}"
26 WMS_VERSION="${NEXUS_REPO}/${WMS_IMG_NAME}:${VERSION}"
27
28 APPS_LATEST="${NEXUS_REPO}/${EP_IMG_NAME}:${LATEST}"
29 DB_LATEST="${NEXUS_REPO}/${DB_IMG_NAME}:${LATEST}"
30 WMS_LATEST="${NEXUS_REPO}/${WMS_IMG_NAME}:${LATEST}"
31
32 # tag versions
33 docker tag ${EP_IMG_NAME}:${PORTAL_TAG} ${APPS_VERSION}
34 docker tag ${EP_IMG_NAME}:${PORTAL_TAG} ${APPS_LATEST}
35
36 docker tag ${DB_IMG_NAME}:${PORTAL_TAG} ${DB_VERSION}
37 docker tag ${DB_IMG_NAME}:${PORTAL_TAG} ${DB_LATEST}
38
39 docker tag ${WMS_IMG_NAME}:${PORTAL_TAG} ${WMS_VERSION}
40 docker tag ${WMS_IMG_NAME}:${PORTAL_TAG} ${WMS_LATEST}
41
42 # push to registry
43 docker push ${APPS_VERSION}
44 docker push ${APPS_LATEST}
45
46 docker push ${DB_VERSION}
47 docker push ${DB_LATEST}
48
49 docker push ${WMS_VERSION}
50 docker push ${WMS_LATEST}