build better deployment pipeline to prevent downtimes
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Robert Kaussow 2019-01-27 16:39:32 +01:00
parent ca78067f6a
commit 8001c6bc36

View File

@ -26,6 +26,22 @@ steps:
branch: [ master ] branch: [ master ]
event: [ push ] event: [ push ]
- name: freeze
image: appleboy/drone-ssh
settings:
host:
from_secret: ssh_host
username:
from_secret: ssh_username
key:
from_secret: ssh_key
script:
- cp -R /var/www/virtual/geeklab/html/geeklabor.de/ /var/www/virtual/geeklab/html/geeklabor_freeze/
- ln -s /var/www/virtual/geeklab/html/geeklabor_freeze /var/www/virtual/geeklab/geeklabor.de
when:
branch: [ master ]
event: [ push ]
- name: publish - name: publish
image: appleboy/drone-scp image: appleboy/drone-scp
settings: settings:
@ -43,6 +59,22 @@ steps:
branch: [ master ] branch: [ master ]
event: [ push ] event: [ push ]
- name: cleanup
image: appleboy/drone-ssh
settings:
host:
from_secret: ssh_host
username:
from_secret: ssh_username
key:
from_secret: ssh_key
script:
- ln -s /var/www/virtual/geeklab/html/geeklabor.de /var/www/virtual/geeklab/geeklabor.de
- rm -rf /var/www/virtual/geeklab/html/geeklabor_freeze/
when:
branch: [ master ]
event: [ push ]
- name: notify - name: notify
image: plugins/matrix image: plugins/matrix
settings: settings: