Skip to content

Commit

Permalink
Programtically push html to primary s3 bucket
Browse files Browse the repository at this point in the history
  • Loading branch information
jolexa committed Apr 1, 2017
1 parent a478696 commit a25db3c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,8 @@ deploy-primary: deploy-primary-infra
"OtherInfraStackRegion=$(STANDBY_REGION)" \
"DeploymentBucket=$(BUCKET_US_EAST1)" \
--capabilities CAPABILITY_IAM || exit 0


push-html-primary-bucket:
aws s3 sync --acl public-read html/ $(shell scripts/find-cfn-output-value.py --region $(PRIMARY_REGION) --output-key PrimaryS3BucketName --stack-name $(PRIMARY_STACKNAME)-infra)
scripts/invalidate-all.py $(PRIMARY_URL)
2 changes: 2 additions & 0 deletions html/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
all:
cd ../ && make push-html-primary-bucket
3 changes: 3 additions & 0 deletions primary-region-infra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ Outputs:
PrimaryS3BucketArn:
Description: "Full S3 Bucket Arn"
Value: !Join [ "", [ 'arn:aws:s3:::' , !Ref PrimaryBucket ] ]
PrimaryS3BucketName:
Description: "S3 Bucket Name"
Value: !Ref PrimaryBucket
CloudFrontDistributionDomainName:
Description: Domain Name
Value: !GetAtt PrimaryCloudFrontDistribution.DomainName
Expand Down
File renamed without changes.

0 comments on commit a25db3c

Please sign in to comment.