Skip to content

Commit 2dc2fd5

Browse files
committed
Add README and license
1 parent 421ba80 commit 2dc2fd5

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Cloud archive
2+
3+
This `WORKSPACE` rule for Google Bazel lets you securely download private
4+
dependencies from S3.
5+
6+
## Requirements
7+
8+
This currently only works on Linux, although adapting it to macOS and Windows
9+
shouldn't be difficult. AWS CLI is required to be in the path, and must be set
10+
up such that you can download files from the buckets referenced in the rules
11+
with `aws s3 cp`. `--profile` flag is also supported, for people who use
12+
multiple profiles.
13+
14+
## Usage
15+
16+
Please refer to `WORKSPACE` file in this repository for an example of how to
17+
use this.
18+
19+
## Future work
20+
21+
Quite obviously this can also be adapted to other cloud storage providers,
22+
basically anything that can download an archive from the command line should
23+
work.
24+
25+
## License
26+
27+
This software is licensed under Apache 2.0.

cloud_archive.bzl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# This rule will download an archive from S3, check sha256, extract it, and
22
# symlink the provided BUILD file inside.
33

4+
# License: Apache 2.0
5+
46

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

0 commit comments

Comments
 (0)