Skip to content

magnumci/bunch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bunch

General purpose utility to cache project dependencies or artifacts to Amazon S3.

Good for caching Rubygems or NPM bundles.

Overview

Bunch is a tool to upload/download contents of any directory from Amazon S3. Initially created to cache Rubygems/NPM bundles as compressed tarballs (tar.gz) to speed up CI build times.

Usage

Run bunch upload/download command with the following options:

bunch [upload|download] \
  --prefix=my-project \
  --path=path/to/dir \
  --manifest=path/to/manifest
  --s3-key=key \
  --s3-secret=secret \
  --s3-bucket=bucket

Options:

  • prefix - Filename prefix. Archives are uploaded in the format: http://s3.amazonaws.com/bucket/prefix-sha1-arch.tar.gz
  • path - Path to directory that should be cached
  • manifest - Path to file that should be used to calculate checksum (Gemfile.lock, package.json, etc).

If you don't want to specify Amazon S3 credentials in terminal, you can always export variables into your environment and they will be loaded automatically.

Example:

export S3_KEY=key
export S3_SECRET=secret
export S3_BUCKET=bucket

Build

Project requires Go 1.2.

To build a binary run, install dependencies and execute build command:

go get
go build

To build for multiple operating systems and architectures, use gox.

Test

Install testify library:

go get github.com/stretchr/testify/assert

And execute test suite:

go test

License

The MIT License (MIT)

Copyright (c) 2014 Dan Sosedoff, [email protected]

About

Cache project dependencies to Amazon S3 bucket

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages