Drone plugins > SFTP Cache
Use this plugin for caching build artifacts to speed up your build times. This plugin can create and restore caches of any folders.
Example
kind: pipeline
name: default
steps:
- name: restore_cache
image: appleboy/drone-sftp-cache
settings:
server: example.com
port: 22
username: test
password: test
path: /var/cache/drone
restore: true
mount:
- node_modules
- name: build
image: node:latest
commands:
- npm install
- name: rebuild_cache
image: appleboy/drone-sftp-cache
settings:
server: example.com
port: 22
username: test
password: test
path: /var/cache/drone
rebuild: true
mount:
- node_modules
Properties
server
stringrequiredtarget hostname or IP
Default: none
port
stringoptionalssh port of target host
Default: none
username
stringoptionalaccount for target host user
Default: none
password
stringoptionalpassword for target host user
Secret recommendedDefault: none
key
stringoptionalplain text of user private key
Secret recommendedDefault: none
rebuild
booleanoptionalflag to trigger a rebuild
Default: none
restoe
booleanoptionalflag to trigger a restore
Default: none
ignore_branch
booleanoptionalflag to ignore commit branch name on hash value
Default: none