build better deployment pipeline to prevent downtimes
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
ca78067f6a
commit
8001c6bc36
32
.drone.yml
32
.drone.yml
@ -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:
|
||||||
|
Reference in New Issue
Block a user