rsync
by drillster
The rsync plugin can be used to transfer files to remote machines, and run a user-defined script afterwards.
Example
kind: pipeline
name: default
steps:
- name: deploy
image: drillster/drone-rsync
settings:
hosts: [ "server-prod1", "server-prod2" ]
source: ./target
target: ~/packages
include: [ "app.jar", "app.jar.md5" ]
script:
- cd ~/packages
- md5sum -c app.jar.md5
Properties
hosts
arrayrequiredlist of hosts (remote machines)
Default: none
port
numberoptionalport to connect to on the remote machines
Default: 22
user
stringoptionaluser to connect as on the remote machines
Default: root
key
stringoptionalprivate SSH key for the remote machines
Secret recommendedDefault: none
source
stringoptionalsource folder to copy from
Default: ./
target
stringoptionaltarget folder on remote machines to copy to
Default: none
include
arrayoptionalrsync include filter
Default: none
exclude
arrayoptionalrsync exclude filter
Default: none
recursive
booleanoptionalinstruct plugin to recursively copy
Default: false
delete
booleanoptionalinstruct plugin to delete the target folder before copying
Default: false
args
stringoptionalinstruct plugin to use these additional rsync CLI arguments, e.g. "--blocking-io"
Default: none
script
arrayoptionallist of commands to execute on remote machines over SSH after rsync occurs
Default: none
prescript
arrayoptionallist of commands to execute on remote machines before rsync occurs
Default: none