Skip to content

Commit

Permalink
invalidate cloudfront cache after upload
Browse files Browse the repository at this point in the history
  • Loading branch information
chregu committed Sep 26, 2016
1 parent bbb5fa3 commit e609d40
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions create_package.sh
Expand Up @@ -135,6 +135,9 @@ cat index.html.tmpl index.html.bottom > index.html
php uploadFile.php index.html index.html "text/html"
php uploadFile.php install.sh install.sh "text/plain"

echo "Invalidate CloudFront Cache";
php invalidateCloudfront.php

#scp ../$TYPE-$NAME-$REL.tar.gz $USER@dev2.liip.ch:/home/liip/dev2/install/$TYPE/$NAME/
#ssh -l $USER dev2.liip.ch "ln -sf ../${TYPE}/${NAME}/${TYPE}-${NAME}-${REL}.tar.gz /home/liip/dev2/install/www/${TYPE}-${NAME}.tar.gz"

Expand Down
10 changes: 10 additions & 0 deletions invalidateCloudfront.php
@@ -0,0 +1,10 @@
<?php
require_once 'AWSSDKforPHP/sdk.class.php';
include("config.inc.php");

$cf = new AmazonCloudFront();
$cf->create_invalidation("E3GN2MEVU47B0I", uniqid("uploadScript"), '/*');




0 comments on commit e609d40

Please sign in to comment.