Git Product home page Git Product logo

drone-s3cache's Introduction

drone-s3cache Docker Repository on Quay

Drone plugin for caching build artifacts in S3

This plugin allows for caching build artifact directories containing external libraries, packages, etc in S3 which should speed up build process. Cache is currently keyed by repository name e.g. UKHomeOffice/<project_name>. This should suffice in most cases. S3 cache automatically expires after 7 days.

Configuration

The following parameters are used to configure the plugin:

  • drone_s3_cache_mode: defines the mode of operation. Possible values pull, push.
  • drone_s3_cache_folders: list of local project directories to be cached in S3, e.g.:
drone_s3_cache_folders: 
  - .bundle
  - folder1
  - folder2/foo
  • drone_s3_cache_bucket_name: S3 bucket name. This can be configured in drone secrets as DRONE_S3_CACHE_BUCKET_NAME. Ensure drone has permissions to get and put objects in that bucket.

AWS credentials need to be present in drone secrets (preferred!) as DRONE_S3_CACHE_AWS_ACCESS_KEY_ID, DRONE_S3_CACHE_AWS_SECRET_ACCESS_KEY or passed to the container via environment variables (local testing!) as AWS_SECRET_KEY_ID, AWS_SECRET_ACCESS_KEY

Drone configuration example

pipeline:
  drone_s3_cache_pull:
    image: quay.io/ukhomeofficedigital/drone-s3cache:latest
    drone_s3_cache_mode: "pull"

  build:
    image: ruby:2.3.1-alpine
    commands:
      - bundle install --path .bundle
    when:
      event: [push, pull_request]

  drone_s3_cache_push:
    image: quay.io/ukhomeofficedigital/drone-s3cache:latest
    drone_s3_cache_folders: ".bundle"
    drone_s3_cache_mode: "push"

Release process

Push / Merge to master will produce a docker image with a tag latest.

To create a new release, just create a new tag off master.

Contributing

We welcome pull requests. Please check issues and existing PRs before submitting a patch.

Author

Marcin Ciszak marcinc

drone-s3cache's People

Contributors

marcinc avatar

Watchers

James Cloos 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.