diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2015-01-13 17:36:15 +0000 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2015-01-14 16:37:47 +0000 |
commit | 7fa239a9c2122074bb65bbb0ac7d30d922a4f761 (patch) | |
tree | e3ef6122a3c3f27894a7353bdb8df69237ee2280 /.travis | |
parent | 78bf9e3589f14436befb73e903ec574d273bf66f (diff) |
Use public bundles for setting up cache.
Forked repos cannot access the secure credentials when making pull
requests. We'd like those to be tested, so have made the bundles public
to be used for installation.
Diffstat (limited to '.travis')
-rwxr-xr-x | .travis/install | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/.travis/install b/.travis/install index 8514e801d..c766d3598 100755 --- a/.travis/install +++ b/.travis/install @@ -4,28 +4,22 @@ import hashlib import os import sys import tarfile - -import boto -from boto.s3.key import Key -from boto.exception import S3ResponseError +import urllib root = os.path.join(os.path.dirname(__file__), '..') with open(os.path.join(root, 'cpanfile.snapshot')) as cpanfile: hash = hashlib.md5(cpanfile.read()).hexdigest() wanted_filename = 'fixmystreet-local-%s.tgz' % hash -conn = boto.connect_s3() -bucket = conn.get_bucket('fixmystreet-bundle-cache') - -k = Key(bucket) -k.key = wanted_filename +url = 'https://fixmystreet-bundle-cache.s3.amazonaws.com/%s' % wanted_filename try: - k.get_contents_to_filename(wanted_filename) + urllib.urlretrieve(url, wanted_filename) if tarfile.is_tarfile(wanted_filename): tfile = tarfile.open(wanted_filename) tfile.extractall() + print "Cached copy found and extracted" sys.exit(0) -except S3ResponseError: +except IOError: os.remove(wanted_filename) print "No cached copy found, running carton install..." |