fix: deploy release

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
Kasper Juul Hermansen 2023-06-04 14:56:16 +02:00
parent 5b1890424e
commit e8f2cdffae
Signed by: kjuulh
GPG Key ID: 57B6E1465221F912
3 changed files with 13 additions and 2 deletions

View File

@ -20,3 +20,5 @@ scripts:
type: shell
push_release:
type: shell
deploy:
type: shell

7
scripts/deploy.sh Executable file
View File

@ -0,0 +1,7 @@
export $(cat .env | xargs)
cuddle_cli x start_deployment
cuddle_cli x render_templates
cuddle_cli x build_release
cuddle_cli x push_release
cuddle_cli x deploy_release

View File

@ -5,6 +5,8 @@ set -e
echo "deploying image"
deploymentrepo="$TMP/deployments"
cd $deploymentrepo
cd "$deploymentrepo"
git add . && git commit -m "Added release $SERVICE: ${COMMIT_SHA:0:10}" && git pull && git push
[[ -z $(git status -s) ]] && (echo 'git repository is clean'; exit 0)
git add . && git commit --allow-empty -m "Added release $SERVICE: ${COMMIT_SHA:0:10}" && git pull && git push