ci: add teamcity build and deployment entry points
This commit is contained in:
18
scripts/teamcity/rollback.sh
Normal file
18
scripts/teamcity/rollback.sh
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
: "${REGISTRY:?REGISTRY is required}"
|
||||
: "${APP_BASE_URL:?APP_BASE_URL is required}"
|
||||
|
||||
if [[ ! -s .previous-image-tag ]]; then
|
||||
echo "No previous image tag is available for rollback" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
IMAGE_TAG="$(cat .previous-image-tag)"
|
||||
export IMAGE_TAG REGISTRY
|
||||
|
||||
docker compose pull edge api worker
|
||||
docker compose up -d --remove-orphans --wait --wait-timeout 120
|
||||
scripts/teamcity/smoke.sh
|
||||
printf '%s\n' "$IMAGE_TAG" > .deployed-image-tag
|
||||
Reference in New Issue
Block a user