add deployment
This commit is contained in:
21
scripts/deploy_release.sh
Executable file
21
scripts/deploy_release.sh
Executable 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
|
Reference in New Issue
Block a user