Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Rebert <github@rebertia.com>2014-09-23 00:22:34 +0400
committerChris Rebert <github@rebertia.com>2014-09-23 00:22:34 +0400
commit4a3931d4c57e30f3ed01cc66092178bb9e565851 (patch)
treea82bc6871160c72eaae1a6979a29dc3d5e05ca30 /test-infra
parent36ebec5e7605f4e0fe7e0caa5149e6d5d2e3b31a (diff)
document S3Cachefile.json
Diffstat (limited to 'test-infra')
-rw-r--r--test-infra/README.md20
1 files changed, 19 insertions, 1 deletions
diff --git a/test-infra/README.md b/test-infra/README.md
index 70043fa390..6ab540396d 100644
--- a/test-infra/README.md
+++ b/test-infra/README.md
@@ -27,7 +27,25 @@ For RubyGems, the `gemdir` of the current RVM-selected Ruby is cached based on t
Travis does offer built-in caching on their paid plans, but this do-it-ourselves S3 solution is significantly cheaper since we only need caching and not Travis' other paid features.
-## Setup
+## Configuration
+`s3_cache.py` is configured via `S3Cachefile.json`, which has the following format:
+```json
+{
+ "cache-name-here": {
+ "key": "path/to/file/to/SHA-256/hash/and/use/that/as/the/cache.key",
+ "cache": "path/to/directory/to/be/cached",
+ "generate": "shell-command --to run --to regenerate --the-cache $from scratch"
+ },
+ ...
+}
+```
+
+`s3_cache.py` will SHA-256 hash the contents of the `key` file and try to fetch a tarball from S3 using the hash as the filename.
+If it's unable to fetch the tarball (either because it doesn't exist or there was a network error), it will run the `generate` command. If it was able to fetch the tarball, it will extract it to the `cache` directory.
+If it had to `generate` the cache, it will later create a tarball of the `cache` directory and try to upload the tarball to S3 using the SHA-256 hash of the `key` file as the tarball's filename.
+
+
+## AWS Setup
### Overview
1. Create an Amazon Web Services (AWS) account.