ci: S1-деплой не блокирующий (continue-on-error + ConnectTimeout 20с)
All checks were successful
All checks were successful
S1 в downtime — деплой не должен валиться, главное доставить на S2. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
d1623cdc75
commit
f1ba6604e6
@ -132,23 +132,27 @@ jobs:
|
|||||||
chmod 600 ~/.ssh/known_hosts
|
chmod 600 ~/.ssh/known_hosts
|
||||||
- name: Install rsync
|
- name: Install rsync
|
||||||
run: apt-get update -qq && apt-get install -y rsync openssh-client
|
run: apt-get update -qq && apt-get install -y rsync openssh-client
|
||||||
|
# S1 — НЕ блокирующий: при недоступности S1 (downtime) деплой не должен
|
||||||
|
# валиться, главное доставить на S2. ConnectTimeout 20с чтобы не висеть.
|
||||||
- name: Deploy to S1 (85.175.7.40:1998)
|
- name: Deploy to S1 (85.175.7.40:1998)
|
||||||
|
continue-on-error: true
|
||||||
run: |
|
run: |
|
||||||
rsync -az --delete-after --human-readable --exclude=wiki --exclude=kubikon-assets \
|
rsync -az --delete-after --human-readable --exclude=wiki --exclude=kubikon-assets \
|
||||||
-e "ssh -i ~/.ssh/id_deploy -o UserKnownHostsFile=~/.ssh/known_hosts -p 1998" \
|
-e "ssh -i ~/.ssh/id_deploy -o UserKnownHostsFile=~/.ssh/known_hosts -o ConnectTimeout=20 -p 1998" \
|
||||||
build/ min@85.175.7.40:/var/www/rublox-studio/build/
|
build/ min@85.175.7.40:/var/www/rublox-studio/build/
|
||||||
- name: Deploy to S2 (192.168.0.124:22, runner в той же сети)
|
- name: Deploy to S2 (192.168.0.124:22, runner в той же сети)
|
||||||
run: |
|
run: |
|
||||||
rsync -az --delete-after --human-readable --exclude=wiki --exclude=kubikon-assets \
|
rsync -az --delete-after --human-readable --exclude=wiki --exclude=kubikon-assets \
|
||||||
-e "ssh -i ~/.ssh/id_deploy -o UserKnownHostsFile=~/.ssh/known_hosts -p 22" \
|
-e "ssh -i ~/.ssh/id_deploy -o UserKnownHostsFile=~/.ssh/known_hosts -p 22" \
|
||||||
build/ min@192.168.0.124:/var/www/rublox-studio/build/
|
build/ min@192.168.0.124:/var/www/rublox-studio/build/
|
||||||
- name: Verify deploy
|
- name: Verify S1 (не блокирующий)
|
||||||
|
continue-on-error: true
|
||||||
run: |
|
run: |
|
||||||
echo "=== S1 ==="
|
ssh -i ~/.ssh/id_deploy -o UserKnownHostsFile=~/.ssh/known_hosts -o ConnectTimeout=20 -p 1998 \
|
||||||
ssh -i ~/.ssh/id_deploy -o UserKnownHostsFile=~/.ssh/known_hosts -p 1998 \
|
|
||||||
min@85.175.7.40 \
|
min@85.175.7.40 \
|
||||||
"ls /var/www/rublox-studio/build/index.html && du -sh /var/www/rublox-studio/build/"
|
"ls /var/www/rublox-studio/build/index.html && du -sh /var/www/rublox-studio/build/"
|
||||||
echo "=== S2 ==="
|
- name: Verify S2 (обязательный)
|
||||||
|
run: |
|
||||||
ssh -i ~/.ssh/id_deploy -o UserKnownHostsFile=~/.ssh/known_hosts -p 22 \
|
ssh -i ~/.ssh/id_deploy -o UserKnownHostsFile=~/.ssh/known_hosts -p 22 \
|
||||||
min@192.168.0.124 \
|
min@192.168.0.124 \
|
||||||
"ls /var/www/rublox-studio/build/index.html && du -sh /var/www/rublox-studio/build/"
|
"ls /var/www/rublox-studio/build/index.html && du -sh /var/www/rublox-studio/build/"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user