summaryrefslogtreecommitdiffstats
path: root/deliveries/os_docker_base.sh
diff options
context:
space:
mode:
authorSunder Tattavarada <statta@research.att.com>2020-02-26 15:28:02 +0000
committerGerrit Code Review <gerrit@onap.org>2020-02-26 15:28:02 +0000
commita03dfa273ef6e196bf65acc54b9357d35eb0ed5e (patch)
tree9445256604dd9acd97337d61339fd95b69be045e /deliveries/os_docker_base.sh
parent751a5e5776b4615c8d3333f7b7d37d17bbf775ba (diff)
parent8e83c25788017acd56271a72286f7dcbc974e76d (diff)
Merge "Changes made to upgrade pom version"
Diffstat (limited to 'deliveries/os_docker_base.sh')
-rwxr-xr-xdeliveries/os_docker_base.sh102
1 files changed, 70 insertions, 32 deletions
diff --git a/deliveries/os_docker_base.sh b/deliveries/os_docker_base.sh
index 94832ff5..b2a32a78 100755
--- a/deliveries/os_docker_base.sh
+++ b/deliveries/os_docker_base.sh
@@ -14,48 +14,86 @@ if [ -z "$LATEST" ]; then
exit 1
fi
-# ONAP docker registry for pushing; may need to move
-# this into os_docker_push, os_docker_release scripts
-NEXUS_REPO=nexus3.onap.org:10003
-
-# Build the containers
-./build_portalapps_dockers.sh
+# ONAP docker registry for pushing; has been moved to
+# .env (or other .env override file from command line)
+# NEXUS_REPO=nexus3.onap.org:10003
# Establish environment variables
source $(dirname $0)/.env
+if [ $1 ]; then
+ source $(dirname $0)/$1
+fi
+
+# Build the containers
+if [ "$SKIP_BUILD_BEFORE_PUSH" = "please" ]; then
+ echo "SKIPPING DOCKER IMAGE BUILD!"
+else
+ ./build_portalapps_dockers.sh $1
+fi
+
+if [ "${PORTAL_DOCKERFILE}" != "skip" ] && [ "${EP_IMG_NAME}" != "skip" ]; then
+ APP_VERSION="${NEXUS_REPO}/${EP_IMG_NAME}:${VERSION}"
+ APP_LATEST="${NEXUS_REPO}/${EP_IMG_NAME}:${LATEST}"
+
+ docker tag ${EP_IMG_NAME}:${PORTAL_TAG} ${APP_VERSION}
+ docker tag ${EP_IMG_NAME}:${PORTAL_TAG} ${APP_LATEST}
+
+ docker push ${APP_VERSION}
+ docker push ${APP_LATEST}
+fi
-APP_VERSION="${NEXUS_REPO}/${EP_IMG_NAME}:${VERSION}"
-SDK_VERSION="${NEXUS_REPO}/${SDK_IMG_NAME}:${VERSION}"
-DB_VERSION="${NEXUS_REPO}/${DB_IMG_NAME}:${VERSION}"
-WMS_VERSION="${NEXUS_REPO}/${WMS_IMG_NAME}:${VERSION}"
+if [ "${SDK_DOCKERFILE}" != "skip" ] && [ "${SDK_IMG_NAME}" != "skip" ]; then
+ SDK_VERSION="${NEXUS_REPO}/${SDK_IMG_NAME}:${VERSION}"
+ SDK_LATEST="${NEXUS_REPO}/${SDK_IMG_NAME}:${LATEST}"
-APP_LATEST="${NEXUS_REPO}/${EP_IMG_NAME}:${LATEST}"
-SDK_LATEST="${NEXUS_REPO}/${SDK_IMG_NAME}:${LATEST}"
-DB_LATEST="${NEXUS_REPO}/${DB_IMG_NAME}:${LATEST}"
-WMS_LATEST="${NEXUS_REPO}/${WMS_IMG_NAME}:${LATEST}"
+ docker tag ${SDK_IMG_NAME}:${PORTAL_TAG} ${SDK_VERSION}
+ docker tag ${SDK_IMG_NAME}:${PORTAL_TAG} ${SDK_LATEST}
-# tag versions
-docker tag ${EP_IMG_NAME}:${PORTAL_TAG} ${APP_VERSION}
-docker tag ${EP_IMG_NAME}:${PORTAL_TAG} ${APP_LATEST}
+ docker push ${SDK_VERSION}
+ docker push ${SDK_LATEST}
+fi
+
+if [ "${FE_DOCKERFILE}" != "skip" ] && [ "${FE_IMG_NAME}" != "skip" ]; then
+ FE_VERSION="${NEXUS_REPO}/${FE_IMG_NAME}:${VERSION}"
+ FE_LATEST="${NEXUS_REPO}/${FE_IMG_NAME}:${LATEST}"
+
+ docker tag ${FE_IMG_NAME}:${PORTAL_TAG} ${FE_VERSION}
+ docker tag ${FE_IMG_NAME}:${PORTAL_TAG} ${FE_LATEST}
-docker tag ${SDK_IMG_NAME}:${PORTAL_TAG} ${SDK_VERSION}
-docker tag ${SDK_IMG_NAME}:${PORTAL_TAG} ${SDK_LATEST}
+ docker push ${FE_VERSION}
+ docker push ${FE_LATEST}
+fi
-docker tag ${DB_IMG_NAME}:${PORTAL_TAG} ${DB_VERSION}
-docker tag ${DB_IMG_NAME}:${PORTAL_TAG} ${DB_LATEST}
+if [ "${BE_DOCKERFILE}" != "skip" ] && [ "${BE_IMG_NAME}" != "skip" ]; then
+ BE_VERSION="${NEXUS_REPO}/${BE_IMG_NAME}:${VERSION}"
+ BE_LATEST="${NEXUS_REPO}/${BE_IMG_NAME}:${LATEST}"
-docker tag ${WMS_IMG_NAME}:${PORTAL_TAG} ${WMS_VERSION}
-docker tag ${WMS_IMG_NAME}:${PORTAL_TAG} ${WMS_LATEST}
+ docker tag ${BE_IMG_NAME}:${PORTAL_TAG} ${BE_VERSION}
+ docker tag ${BE_IMG_NAME}:${PORTAL_TAG} ${BE_LATEST}
-# push to registry
-docker push ${APP_VERSION}
-docker push ${APP_LATEST}
+ docker push ${BE_VERSION}
+ docker push ${BE_LATEST}
+fi
-docker push ${SDK_VERSION}
-docker push ${SDK_LATEST}
+if [ "${DB_DOCKERFILE}" != "skip" ] && [ "${DB_IMG_NAME}" != "skip" ]; then
+ DB_VERSION="${NEXUS_REPO}/${DB_IMG_NAME}:${VERSION}"
+ DB_LATEST="${NEXUS_REPO}/${DB_IMG_NAME}:${LATEST}"
-docker push ${DB_VERSION}
-docker push ${DB_LATEST}
+ docker tag ${DB_IMG_NAME}:${PORTAL_TAG} ${DB_VERSION}
+ docker tag ${DB_IMG_NAME}:${PORTAL_TAG} ${DB_LATEST}
+
+ docker push ${DB_VERSION}
+ docker push ${DB_LATEST}
+fi
+
+if [ "${WMS_DOCKERFILE}" != "skip" ] && [ "${WMS_IMG_NAME}" != "skip" ]; then
+ WMS_VERSION="${NEXUS_REPO}/${WMS_IMG_NAME}:${VERSION}"
+ WMS_LATEST="${NEXUS_REPO}/${WMS_IMG_NAME}:${LATEST}"
+
+ docker tag ${WMS_IMG_NAME}:${PORTAL_TAG} ${WMS_VERSION}
+ docker tag ${WMS_IMG_NAME}:${PORTAL_TAG} ${WMS_LATEST}
+
+ docker push ${WMS_VERSION}
+ docker push ${WMS_LATEST}
+fi
-docker push ${WMS_VERSION}
-docker push ${WMS_LATEST}