Skip to content

Commit

Permalink
Add README and license
Browse files Browse the repository at this point in the history
  • Loading branch information
1e100 committed Jun 6, 2019
1 parent 421ba80 commit 2dc2fd5
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Cloud archive

This `WORKSPACE` rule for Google Bazel lets you securely download private
dependencies from S3.

## Requirements

This currently only works on Linux, although adapting it to macOS and Windows
shouldn't be difficult. AWS CLI is required to be in the path, and must be set
up such that you can download files from the buckets referenced in the rules
with `aws s3 cp`. `--profile` flag is also supported, for people who use
multiple profiles.

## Usage

Please refer to `WORKSPACE` file in this repository for an example of how to
use this.

## Future work

Quite obviously this can also be adapted to other cloud storage providers,
basically anything that can download an archive from the command line should
work.

## License

This software is licensed under Apache 2.0.
2 changes: 2 additions & 0 deletions cloud_archive.bzl
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# This rule will download an archive from S3, check sha256, extract it, and
# symlink the provided BUILD file inside.

# License: Apache 2.0


def _s3_archive_impl(ctx):
url = "s3://{}/{}".format(ctx.attr.bucket, ctx.attr.file_path)
Expand Down

0 comments on commit 2dc2fd5

Please sign in to comment.