cuddle-rust-service-plan/scripts/deploy_release.sh
2022-08-14 17:30:46 +02:00

21 lines
487 B
Bash
Executable File

#!/bin/bash
set -e
echo "deploying docker image"
tag="$REGISTRY/$SERVICE:${COMMIT_SHA:0:10}"
echo "pulling deployments repo"
git clone "$DEPLOYMENTS" _deployments
[ ! -d _deployments ] && echo "deployments could not be cloned aborting" && exit 1
mkdir -p "_deployments/$SERVICE"
cp "$TMP/docker-compose.deploy_release.yml" "_deployments/$SERVICE/docker-compose.yml"
cd _deployments
git add . && git commit -m "Added release $SERVICE: ${COMMIT_SHA:0:10}" && git pull && git push