Git Product home page Git Product logo

drone-sftp-cache's Introduction

drone-sftp-cache

Drone plugin for caching artifacts to a central server using rsync

Build

Build the binary with the following commands:

export GO15VENDOREXPERIMENT=1
export GOOS=linux
export GOARCH=amd64
export CGO_ENABLED=0

go build -a -tags netgo

Docker

Build the docker image with the following commands:

docker build --rm=true -t plugins/sftp-cache .

Please note incorrectly building the image for the correct x64 linux and with GCO disabled will result in an error when running the Docker image:

docker: Error response from daemon: Container command
'/bin/drone-sftp-cache' not found or does not exist..

Usage

Build and publish from your current working directory:

docker run --rm \
  -e DRONE_REPO=octocat/hello-world \
  -e DRONE_REPO_BRANCH=master \
  -e DRONE_COMMIT_BRANCH=master \
  -e PLUGIN_MOUNT=node_modules \
  -e PLUGIN_RESTORE=false \
  -e PLUGIN_REBUILD=true \
  -e SFTP_CACHE_SERVER=1.2.3.4:22 \
  -e SFTP_CACHE_PATH=/root/cache \
  -e SFTP_CACHE_USERNAME=root \
  -e SFTP_CACHE_PRIVATE_KEY=$(cat ~/.ssh/id_rsa) \
  plugins/sftp-cache

drone-sftp-cache's People

Contributors

bradrydzewski avatar

Watchers

James Cloos avatar Koen Schmeets avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.