add deployment

This commit is contained in:
2022-08-14 17:27:44 +02:00
parent 2f69fc5422
commit 280a9786ec
3 changed files with 40 additions and 0 deletions

21
scripts/deploy_release.sh Executable file
View File

@@ -0,0 +1,21 @@
#!/bin/bash
set -e
echo "deploying docker image"
tag="$REGISTRY/$SERVICE:${COMMIT_SHA:0:10}"
echo "pulling deployments repo"
[ ! -d _deployments ] && echo "deployments could not be cloned aborting" && exit 1
git clone "$DEPLOYMENTS" _deployments
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