Merge "Fixes sonar issues in API_Artifact"
[aaf/authz.git] / auth / docker / dbuild.sh
1 #!/bin/bash 
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 . ./d.props
7 # TODO add ability to do DEBUG settings
8
9 if ["$1" == ""]; then
10   AAF_COMPONENTS=`ls ../aaf_*HOT/bin | grep -v '\.'`
11 else
12   AAF_COMPONENTS=$1
13 fi
14
15 for AAF_COMPONENT in ${AAF_COMPONENTS}; do
16         echo Building aaf_$AAF_COMPONENT...
17         sed -e 's/${AAF_VERSION}/'${VERSION}'/g' -e 's/${AAF_COMPONENT}/'${AAF_COMPONENT}'/g' Dockerfile > ../aaf_${VERSION}/Dockerfile
18         cd ..
19         docker build -t ${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/aaf_${AAF_COMPONENT}:${VERSION}  aaf_${VERSION}
20                 docker tag ${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/aaf_${AAF_COMPONENT}:${VERSION} ${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/aaf_${AAF_COMPONENT}:${OLD_VERSION}
21                 docker tag ${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/aaf_${AAF_COMPONENT}:${VERSION} ${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/aaf_${AAF_COMPONENT}:${NEW_VERSION}
22         rm aaf_${VERSION}/Dockerfile
23         cd -
24 done
25
26