This commit is contained in:
parent
c6ab747c64
commit
43527f177d
10
.drone.yml
10
.drone.yml
|
@ -51,19 +51,17 @@ steps:
|
||||||
from_secret: SCP_USER
|
from_secret: SCP_USER
|
||||||
SCP_PORT:
|
SCP_PORT:
|
||||||
from_secret: SCP_PORT
|
from_secret: SCP_PORT
|
||||||
SCP_TARGET_DIRECTORY:
|
#SCP_TARGET_DIRECTORY:
|
||||||
from_secret: SCP_TARGET_DIRECTORY
|
# from_secret: SCP_TARGET_DIRECTORY
|
||||||
SCP_COMMAND:
|
SCP_COMMAND:
|
||||||
from_secret: SCP_COMMAND
|
from_secret: SCP_COMMAND
|
||||||
commands:
|
commands:
|
||||||
- ls public/
|
|
||||||
- mkdir $HOME/.ssh
|
- mkdir $HOME/.ssh
|
||||||
- echo "$SCP_KEY" > $HOME/.ssh/id_rsa
|
- echo "$SCP_KEY" > $HOME/.ssh/id_rsa
|
||||||
- ssh-keyscan -t rsa -p $SCP_PORT $SCP_HOSTNAME >> $HOME/.ssh/known_hosts
|
- ssh-keyscan -t rsa -p $SCP_PORT $SCP_HOSTNAME >> $HOME/.ssh/known_hosts
|
||||||
- chmod -R og-rw $HOME/.ssh/
|
- chmod -R og-rw $HOME/.ssh/
|
||||||
- echo $SCP_TARGET_DIRECTORY
|
- scp -r -P $SCP_PORT -i $HOME/.ssh/id_rsa public $SCP_USER@$SCP_HOSTNAME:~/
|
||||||
#- scp -r -P $SCP_PORT -i $HOME/.ssh/id_rsa public $SCP_USER@$SCP_HOSTNAME:~/
|
- ssh -p $SCP_PORT -i $HOME/.ssh/id_rsa $SCP_USER@$SCP_HOSTNAME 'rm -rvf /srv/apps/blog/data/www/public/*; mv ~/public/* /srv/apps/blog/data/www/public/; docker-compose -f /srv/apps/blog/docker-compose.yml restart; rm -rvf ~/public'
|
||||||
#- ssh -p $SCP_PORT -i $HOME/.ssh/id_rsa $SCP_USER@$SCP_HOSTNAME 'rm -rvf $SCP_TARGET_DIRECTORY/*; mv ~/public/* $SCP_TARGET_DIRECTORY; ~/$SCP_COMMAND; rm -rvf ~/public'
|
|
||||||
#- ssh -p $SCP_PORT -i $HOME/.ssh/id_rsa $SCP_USER@$SCP_HOSTNAME 'rm -rvf $SCP_TARGET_DIRECTORY/*; mv ~/public/* $SCP_TARGET_DIRECTORY; ~/$SCP_COMMAND'
|
#- ssh -p $SCP_PORT -i $HOME/.ssh/id_rsa $SCP_USER@$SCP_HOSTNAME 'rm -rvf $SCP_TARGET_DIRECTORY/*; mv ~/public/* $SCP_TARGET_DIRECTORY; ~/$SCP_COMMAND'
|
||||||
|
|
||||||
#- name: rereveille_toi
|
#- name: rereveille_toi
|
||||||
|
|
Loading…
Reference in a new issue