Skip to content

Commit

Permalink
Revert "Only deploy if flag $DEPLOY is set"
Browse files Browse the repository at this point in the history
  • Loading branch information
tim0dd authored Dec 7, 2023
1 parent 58c49d4 commit 5f0756b
Showing 1 changed file with 14 additions and 29 deletions.
43 changes: 14 additions & 29 deletions tools/build_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,32 +15,17 @@ while getopts 'pr:' flag; do
esac
done

if [ $DEPLOY == 1 ]
then
docker run -it --rm --privileged tonistiigi/binfmt --install all
docker buildx create --use --name mybuilder
docker buildx build --platform ${DOCKER_PLATFORMS} -t "${registry}teastore-db" ../utilities/tools.descartes.teastore.database/ --push
docker buildx build --platform ${DOCKER_PLATFORMS} -t "${registry}teastore-kieker-rabbitmq" ../utilities/tools.descartes.teastore.kieker.rabbitmq/ --push
docker buildx build --platform ${DOCKER_PLATFORMS} -t "${registry}teastore-base" ../utilities/tools.descartes.teastore.dockerbase/ --push
perl -i -pe's|.*FROM descartesresearch/|FROM '"${registry}"'|g' ../services/tools.descartes.teastore.*/Dockerfile
docker buildx build --platform ${DOCKER_PLATFORMS} -t "${registry}teastore-registry" ../services/tools.descartes.teastore.registry/ --push
docker buildx build --platform ${DOCKER_PLATFORMS} -t "${registry}teastore-persistence" ../services/tools.descartes.teastore.persistence/ --push
docker buildx build --platform ${DOCKER_PLATFORMS} -t "${registry}teastore-image" ../services/tools.descartes.teastore.image/ --push
docker buildx build --platform ${DOCKER_PLATFORMS} -t "${registry}teastore-webui" ../services/tools.descartes.teastore.webui/ --push
docker buildx build --platform ${DOCKER_PLATFORMS} -t "${registry}teastore-auth" ../services/tools.descartes.teastore.auth/ --push
docker buildx build --platform ${DOCKER_PLATFORMS} -t "${registry}teastore-recommender" ../services/tools.descartes.teastore.recommender/ --push
perl -i -pe's|.*FROM '"${registry}"'|FROM descartesresearch/|g' ../services/tools.descartes.teastore.*/Dockerfile
docker buildx rm mybuilder
else
registry='descartesresearch/'
docker buildx build -t "${registry}teastore-db" ../utilities/tools.descartes.teastore.database/ --load
docker buildx build -t "${registry}teastore-kieker-rabbitmq" ../utilities/tools.descartes.teastore.kieker.rabbitmq/ --load
docker buildx build -t "${registry}teastore-base" ../utilities/tools.descartes.teastore.dockerbase/ --load
docker buildx build -t "${registry}teastore-registry" ../services/tools.descartes.teastore.registry/ --load
docker buildx build -t "${registry}teastore-persistence" ../services/tools.descartes.teastore.persistence/ --load
docker buildx build -t "${registry}teastore-image" ../services/tools.descartes.teastore.image/ --load
docker buildx build -t "${registry}teastore-webui" ../services/tools.descartes.teastore.webui/ --load
docker buildx build -t "${registry}teastore-auth" ../services/tools.descartes.teastore.auth/ --load
docker buildx build -t "${registry}teastore-recommender" ../services/tools.descartes.teastore.recommender/ --load
fi

docker run -it --rm --privileged tonistiigi/binfmt --install all
docker buildx create --use --name mybuilder
docker buildx build --platform ${DOCKER_PLATFORMS} -t "${registry}teastore-db" ../utilities/tools.descartes.teastore.database/ --push
docker buildx build --platform ${DOCKER_PLATFORMS} -t "${registry}teastore-kieker-rabbitmq" ../utilities/tools.descartes.teastore.kieker.rabbitmq/ --push
docker buildx build --platform ${DOCKER_PLATFORMS} -t "${registry}teastore-base" ../utilities/tools.descartes.teastore.dockerbase/ --push
perl -i -pe's|.*FROM descartesresearch/|FROM '"${registry}"'|g' ../services/tools.descartes.teastore.*/Dockerfile
docker buildx build --platform ${DOCKER_PLATFORMS} -t "${registry}teastore-registry" ../services/tools.descartes.teastore.registry/ --push
docker buildx build --platform ${DOCKER_PLATFORMS} -t "${registry}teastore-persistence" ../services/tools.descartes.teastore.persistence/ --push
docker buildx build --platform ${DOCKER_PLATFORMS} -t "${registry}teastore-image" ../services/tools.descartes.teastore.image/ --push
docker buildx build --platform ${DOCKER_PLATFORMS} -t "${registry}teastore-webui" ../services/tools.descartes.teastore.webui/ --push
docker buildx build --platform ${DOCKER_PLATFORMS} -t "${registry}teastore-auth" ../services/tools.descartes.teastore.auth/ --push
docker buildx build --platform ${DOCKER_PLATFORMS} -t "${registry}teastore-recommender" ../services/tools.descartes.teastore.recommender/ --push
perl -i -pe's|.*FROM '"${registry}"'|FROM descartesresearch/|g' ../services/tools.descartes.teastore.*/Dockerfile
docker buildx rm mybuilder

0 comments on commit 5f0756b

Please sign in to comment.