This commit is contained in:
parent
77a21f72b5
commit
dbdc98fea4
37
.drone.yml
37
.drone.yml
|
@ -53,26 +53,29 @@ steps:
|
||||||
from_secret: SCP_PORT
|
from_secret: SCP_PORT
|
||||||
SCP_TARGET:
|
SCP_TARGET:
|
||||||
from_secret: SCP_TARGET_DIRECTORY
|
from_secret: SCP_TARGET_DIRECTORY
|
||||||
|
SCP_COMMAND:
|
||||||
|
from_secret: SCP_COMMAND
|
||||||
commands:
|
commands:
|
||||||
- ls
|
- 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/
|
||||||
- scp -rP $SCP_PORT -i $HOME/.ssh/id_rsa public/ $SCP_USER@$SCP_HOSTNAME:$SCP_TARGET_DIRECTORY
|
- scp -r -P $SCP_PORT -i $HOME/.ssh/id_rsa public/ $SCP_USER@$SCP_HOSTNAME:$SCP_TARGET_DIRECTORY
|
||||||
|
- ssh -p $SCP_PORT -i $HOME/.ssh/id_rsa $SCP_USER@$SCP_HOSTNAME '$SCP_COMMAND'
|
||||||
|
|
||||||
- name: rereveille_toi
|
#- name: rereveille_toi
|
||||||
image: appleboy/drone-ssh
|
# image: appleboy/drone-ssh
|
||||||
settings:
|
# settings:
|
||||||
host:
|
# host:
|
||||||
from_secret: SCP_HOSTNAME
|
# from_secret: SCP_HOSTNAME
|
||||||
port:
|
# port:
|
||||||
from_secret: SCP_PORT
|
# from_secret: SCP_PORT
|
||||||
username:
|
# username:
|
||||||
from_secret: SCP_USERNAME
|
# from_secret: SCP_USERNAME
|
||||||
#password: {from_secret: SCP_PASSWORD}
|
# #password: {from_secret: SCP_PASSWORD}
|
||||||
key:
|
# key:
|
||||||
from_secret: SCP_KEY
|
# from_secret: SCP_KEY
|
||||||
script:
|
# script:
|
||||||
#- {from_secret: SSH_COMMAND}
|
# #- {from_secret: SSH_COMMAND}
|
||||||
- docker-compose -f /srv/apps/blog/docker-compose.yml restart
|
# - docker-compose -f /srv/apps/blog/docker-compose.yml restart
|
||||||
|
|
Loading…
Reference in a new issue