Merge "JUnits for Mapper_2_0"
[aaf/authz.git] / auth / docker / agent.sh
index 4aba092..38b1070 100644 (file)
@@ -9,10 +9,15 @@ fi
  
 . ./aaf.props
 
-for V in VERSION AAF_FQDN AAF_FQDN_IP DEPLOY_FQI APP_FQDN APP_FQI VOLUME DRIVER LATITUDE LONGITUDE; do
+
+for V in VERSION DOCKER_REPOSITORY AAF_FQDN AAF_FQDN_IP DEPLOY_FQI APP_FQDN APP_FQI VOLUME DRIVER LATITUDE LONGITUDE; do
    if [ "$(grep $V ./aaf.props)" = "" ]; then
       unset DEF
       case $V in
+        DOCKER_REPOSITORY) 
+               PROMPT="Docker Repo"
+               DEF=""
+               ;;
          AAF_FQDN)   PROMPT="AAF's FQDN";;
          DEPLOY_FQI) PROMPT="Deployer's FQI";;
          AAF_FQDN_IP)
@@ -53,6 +58,12 @@ if [ "$(docker volume ls | grep ${VOLUME})" = "" ]; then
   docker volume create -d ${DRIVER} ${VOLUME}
 fi
 
+if [ -n "$DOCKER_REPOSITORY" ]; then
+  PREFIX="$DOCKER_REPOSITORY/"
+else
+  PREFIX=""
+fi 
+
 docker run \
     -it \
     --rm \
@@ -66,5 +77,5 @@ docker run \
     --env LATITUDE=${LATITUDE} \
     --env LONGITUDE=${LONGITUDE} \
     --name aaf_agent_$USER \
-    onap/aaf/aaf_agent:$VERSION \
+    "$PREFIX"onap/aaf/aaf_agent:$VERSION \
     /bin/bash "$@"