Fix shs for REPO
Issue-ID: AAF-419
Change-Id: I2cec912c935a28c818ad4358cd236c153de54c30
Signed-off-by: Instrumental <jonathan.gathman@att.com>
diff --git a/auth/docker/aaf.sh b/auth/docker/aaf.sh
index 441cf2b..a54c54a 100644
--- a/auth/docker/aaf.sh
+++ b/auth/docker/aaf.sh
@@ -12,5 +12,5 @@
--env LATITUDE=${LATITUDE} \
--env LONGITUDE=${LONGITUDE} \
--name aaf_config_$USER \
- ${ORG}/${PROJECT}/aaf_config:${VERSION} \
+ $PREFIX${ORG}/${PROJECT}/aaf_config:${VERSION} \
/bin/bash "$@"
diff --git a/auth/docker/components b/auth/docker/components
new file mode 100644
index 0000000..0a4a66a
--- /dev/null
+++ b/auth/docker/components
@@ -0,0 +1,7 @@
+service
+locate
+oauth
+gui
+fs
+cm
+hello
diff --git a/auth/docker/d.props.init b/auth/docker/d.props.init
index 54a83b7..1394c76 100644
--- a/auth/docker/d.props.init
+++ b/auth/docker/d.props.init
@@ -4,6 +4,8 @@
DOCKER_REPOSITORY=nexus3.onap.org:10003
VERSION=2.1.2-SNAPSHOT
CONF_ROOT_DIR=/opt/app/osaaf
+# For local builds, set PREFIX=
+PREFIX="$DOCKER_REPOSITORY/"
# Local Env info
HOSTNAME=aaf.osaaf.org
diff --git a/auth/docker/dclean.sh b/auth/docker/dclean.sh
index b502c02..d83a132 100644
--- a/auth/docker/dclean.sh
+++ b/auth/docker/dclean.sh
@@ -3,9 +3,9 @@
. ./d.props
if [ "$1" == "" ]; then
- AAF_COMPONENTS=$(ls ../aaf_${VERSION}/bin | grep -v '\.')
+ AAF_COMPONENTS="$(cat components) config core agent"
else
- AAF_COMPONENTS=$1
+ AAF_COMPONENTS="$@"
fi
docker image rm $ORG/$PROJECT/aaf_agent:${VERSION}
@@ -15,5 +15,9 @@
echo "Y" | docker container prune
for AAF_COMPONENT in ${AAF_COMPONENTS}; do
docker image rm $ORG/$PROJECT/aaf_$AAF_COMPONENT:${VERSION}
+ if [ "$PREFIX" = "" ]; then
+ docker image rm $DOCKER_REPOSITORY/$ORG/$PROJECT/aaf_$AAF_COMPONENT:${VERSION}
+ docker image rm $DOCKER_REPOSITORY/$ORG/$PROJECT/aaf_$AAF_COMPONENT:latest
+ fi
done
echo "Y" | docker image prune
diff --git a/auth/docker/dpush.sh b/auth/docker/dpush.sh
index 55d2d6f..f6ea970 100644
--- a/auth/docker/dpush.sh
+++ b/auth/docker/dpush.sh
@@ -4,12 +4,13 @@
# Pull in Variables from d.props
. ./d.props
-if ["$1" == ""]; then
- AAF_COMPONENTS="config agent core `ls ../aaf_*HOT/bin | grep -v '\.'`"
+f [ "$1" == "" ]; then
+ AAF_COMPONENTS=$(cat components)
else
- AAF_COMPONENTS=$1
+ AAF_COMPONENTS="$@"
fi
+
for AAF_COMPONENT in ${AAF_COMPONENTS}; do
# docker push ${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/aaf_${AAF_COMPONENT}:${OLD_VERSION}
docker push ${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/aaf_${AAF_COMPONENT}:${VERSION}
diff --git a/auth/docker/drun.sh b/auth/docker/drun.sh
index 8cedbcc..04f5b32 100644
--- a/auth/docker/drun.sh
+++ b/auth/docker/drun.sh
@@ -12,7 +12,7 @@
. ./cass.props
if [ "$1" == "" ]; then
- AAF_COMPONENTS=$(ls -r ../aaf_${VERSION}/bin | grep -v '\.')
+ AAF_COMPONENTS=$(cat components)
else
AAF_COMPONENTS="$@"
fi
@@ -57,5 +57,5 @@
${LINKS} \
--publish $PORTMAP \
--mount 'type=volume,src=aaf_config,dst='$CONF_ROOT_DIR',volume-driver=local' \
- ${ORG}/${PROJECT}/aaf_${AAF_COMPONENT}:${VERSION}
+ ${PREFIX}${ORG}/${PROJECT}/aaf_${AAF_COMPONENT}:${VERSION}
done
diff --git a/auth/docker/dstart.sh b/auth/docker/dstart.sh
index 4c0a46f..6a29785 100644
--- a/auth/docker/dstart.sh
+++ b/auth/docker/dstart.sh
@@ -3,7 +3,7 @@
. ./d.props
if [ "$1" == "" ]; then
- AAF_COMPONENTS=$(ls -r ../aaf_${VERSION}/bin | grep -v '\.')
+ AAF_COMPONENTS=$(cat components)
else
AAF_COMPONENTS="$@"
fi
diff --git a/auth/docker/dstop.sh b/auth/docker/dstop.sh
index c6e1cfe..acec6c7 100644
--- a/auth/docker/dstop.sh
+++ b/auth/docker/dstop.sh
@@ -3,7 +3,7 @@
. ./d.props
if [ "$1" == "" ]; then
- AAF_COMPONENTS=$(ls ../aaf_${VERSION}/bin | grep -v '\.')
+ AAF_COMPONENTS=$(cat components)
else
AAF_COMPONENTS="$@"
fi