deploy: serialize Gitea production deployments
DH V2 CI / API · typecheck, tests, build (push) Successful in 30s
DH V2 CI / WEB · typecheck, build (push) Successful in 17s
Production dependency audit / API · production dependencies (push) Successful in 9s
Production dependency audit / WEB · production dependencies (push) Successful in 8s
DH V2 CI / Docker / scripts contract (push) Successful in 48s
DH V2 CI / API · typecheck, tests, build (push) Successful in 30s
DH V2 CI / WEB · typecheck, build (push) Successful in 17s
Production dependency audit / API · production dependencies (push) Successful in 9s
Production dependency audit / WEB · production dependencies (push) Successful in 8s
DH V2 CI / Docker / scripts contract (push) Successful in 48s
This commit is contained in:
@@ -3,6 +3,14 @@ set -Eeuo pipefail
|
|||||||
|
|
||||||
APP="/var/www/dhv2.korexlabs.com"
|
APP="/var/www/dhv2.korexlabs.com"
|
||||||
BACKUP_ROOT="/root/DH_V2_BACKUPS"
|
BACKUP_ROOT="/root/DH_V2_BACKUPS"
|
||||||
|
LOCK="/var/lock/dhv2-deploy.lock"
|
||||||
|
|
||||||
|
exec 9>"$LOCK"
|
||||||
|
|
||||||
|
if ! flock -n 9; then
|
||||||
|
echo "Otro deploy de DH V2 ya está en curso. No se realiza ninguna modificación."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
DEPLOY_REF="${DHV2_DEPLOY_REF:-deploy}"
|
DEPLOY_REF="${DHV2_DEPLOY_REF:-deploy}"
|
||||||
STAMP="$(date +%Y%m%d_%H%M%S)"
|
STAMP="$(date +%Y%m%d_%H%M%S)"
|
||||||
BACKUP="$BACKUP_ROOT/GITEA_DEPLOY_${STAMP}"
|
BACKUP="$BACKUP_ROOT/GITEA_DEPLOY_${STAMP}"
|
||||||
|
|||||||
Reference in New Issue
Block a user