ci: serialize customer deploys
All checks were successful
CI/CD Pipeline / Quality Gate (push) Successful in 18s
CI/CD Pipeline / Quality Gate (pull_request) Successful in 18s
CI/CD Pipeline / Build and Push Images (push) Successful in 4s
CI/CD Pipeline / Build and Push Images (pull_request) Successful in 1s
CI/CD Pipeline / Internal Notify (push) Successful in 1s
CI/CD Pipeline / Deploy Dev in Dokploy (push) Successful in 1s
CI/CD Pipeline / Internal Notify (pull_request) Successful in 0s
CI/CD Pipeline / Deploy Dev in Dokploy (pull_request) Successful in 1s
All checks were successful
CI/CD Pipeline / Quality Gate (push) Successful in 18s
CI/CD Pipeline / Quality Gate (pull_request) Successful in 18s
CI/CD Pipeline / Build and Push Images (push) Successful in 4s
CI/CD Pipeline / Build and Push Images (pull_request) Successful in 1s
CI/CD Pipeline / Internal Notify (push) Successful in 1s
CI/CD Pipeline / Deploy Dev in Dokploy (push) Successful in 1s
CI/CD Pipeline / Internal Notify (pull_request) Successful in 0s
CI/CD Pipeline / Deploy Dev in Dokploy (pull_request) Successful in 1s
This commit is contained in:
@@ -166,9 +166,7 @@ jobs:
|
||||
)
|
||||
proxy_command="ssh -i ${key_path} -o BatchMode=yes -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o GlobalKnownHostsFile=/dev/null -o LogLevel=ERROR -o ConnectTimeout=15 -W %h:%p ${CUSTOMER_SSH_PROXY_HOST}"
|
||||
remote_command="set -euo pipefail
|
||||
cd /ecos
|
||||
FORCE_PULL=1 COMPOSE_FILE='${CUSTOMER_COMPOSE_FILE}' '${CUSTOMER_DEPLOY_SCRIPT}'
|
||||
docker image prune -f"
|
||||
flock -w 1800 /tmp/ecos-customer-deploy.lock /bin/sh -c 'cd /ecos && FORCE_PULL=1 COMPOSE_FILE=\"${CUSTOMER_COMPOSE_FILE}\" \"${CUSTOMER_DEPLOY_SCRIPT}\" && docker image prune -f'"
|
||||
|
||||
ssh "${ssh_common[@]}" -o "ProxyCommand=${proxy_command}" "${CUSTOMER_DEPLOY_USER}@${CUSTOMER_DEPLOY_HOST}" "true"
|
||||
ssh "${ssh_common[@]}" -o "ProxyCommand=${proxy_command}" "${CUSTOMER_DEPLOY_USER}@${CUSTOMER_DEPLOY_HOST}" "${remote_command}"
|
||||
|
||||
Reference in New Issue
Block a user