Drone plugin to deploy or update a project via Rsync. For the usage information and a listing of the available options please take a look at the docs.
Use the rsync plugin to deploy files to a server using rsync over ssh. The following parameters are used to configure this plugin:
hosts- connects to this host addressuser- connects as this userport- connects to this host portkey- SSH RSA privete key for remote hostsource- source path from which files are copied , if you want skip rsync ,set source null or comment itsource:target- target path to which files are copiedtarget: /docker/proj/chmod- chmod remote target after finish rsyncchmod: 0644chown- chown remote target after finish rsyncchown: "33:33"delete- delete extraneous files from the target dirdelete: trueinclude- include files matching the specified patternexclude- exclude files matching the specified patternfilter- include or exclude files according to filtering rulesexport- export ENV used for script in remote machine by sshscript- execute commands on the remote host after files are copied
Sample configuration in the .drone.yml file:
deploy:
rsync:
user: root
host: 127.0.0.1
port: 22
source: copy/files/from
target: send/files/to
delete: false
exclude:
- "exclude/this/pattern/*"
- "or/this/one"
script:
- service nginx restartThe plugin authenticates to your server using a per-repository SSH key generated by Drone. You can find the public key in your repository settings in Drone. You will need to copy / paste this key into your ~/.ssh/authorized_keys file on your remote machine.