mirror of
https://github.com/jessfraz/dockerfiles.git
synced 2024-11-23 11:31:49 +01:00
update cf-reset-cache for blog
Signed-off-by: Jessica Frazelle <princess@docker.com>
This commit is contained in:
parent
cb4944628c
commit
66c9c3ac44
|
@ -29,10 +29,18 @@ docs = s3_conn.get_bucket(bucket)
|
|||
items = []
|
||||
|
||||
for key in docs.list():
|
||||
index_file = "/index.html"
|
||||
if key.name.endswith((index_file)):
|
||||
# append the file without the postfix as well
|
||||
items.append(key.name.replace(index_file, ""))
|
||||
items.append(key.name.replace(index_file, "/"))
|
||||
items.append(key.name)
|
||||
|
||||
cf_conn = boto.connect_cloudfront(access_key, access_secret)
|
||||
inval_req = cf_conn.create_invalidation_request(cloudfront_dist, items)
|
||||
|
||||
print "Invalidating these files: "
|
||||
print items
|
||||
|
||||
print inval_req
|
||||
sys.exit(0)
|
||||
sys.exit(0)
|
Loading…
Reference in New Issue
Block a user