Fixing docker build scipt
[aaf/authz.git] / auth / docker / dbuild.sh
1 #!/bin/bash dbuild.sh
2 #
3 # Docker Building Script.  Reads all the components generated by install, on per-version basis
4 #
5 # Pull in Variables from d.props
6 ORG=onap
7 PROJECT=aaf
8 DOCKER_REPOSITORY=nexus3.onap.org:10003
9 VERSION=2.1.0-SNAPSHOT
10 ./d.props
11 # TODO add ability to do DEBUG settings
12
13 if ["$1" == ""]; then
14   AAF_COMPONENTS=`ls ../aaf_*HOT/bin | grep -v '\.'`
15 else
16   AAF_COMPONENTS=$1
17 fi
18
19 for AAF_COMPONENT in ${AAF_COMPONENTS}; do
20         echo Building aaf_$AAF_COMPONENT...
21         sed -e 's/${AAF_VERSION}/'${VERSION}'/g' -e 's/${AAF_COMPONENT}/'${AAF_COMPONENT}'/g' Dockerfile > ../aaf_${VERSION}/Dockerfile
22         cd ..
23         docker build -t ${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/aaf_${AAF_COMPONENT}:${VERSION}  aaf_${VERSION}
24         rm aaf_${VERSION}/Dockerfile
25         cd -
26 done
27
28