Drone plugins > SFTP Cache
term.svg

SFTP Cache

by appleboy


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

    stringrequired

    target hostname or IP

    Default: none

  • port

    stringoptional

    ssh port of target host

    Default: none

  • username

    stringoptional

    account for target host user

    Default: none

  • password

    stringoptional

    password for target host user

    Secret recommended

    Default: none

  • key

    stringoptional

    plain text of user private key

    Secret recommended

    Default: none

  • rebuild

    booleanoptional

    flag to trigger a rebuild

    Default: none

  • restoe

    booleanoptional

    flag to trigger a restore

    Default: none

  • ignore_branch

    booleanoptional

    flag to ignore commit branch name on hash value

    Default: none