Skip to content

Commit

Permalink
Merge pull request #22 from zaro0508/fix-template-promotion
Browse files Browse the repository at this point in the history
Fix template promotion
  • Loading branch information
zaro0508 authored Mar 15, 2018
2 parents 189e928 + c6319d3 commit cfbf7b8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions deploy_infra.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env bash
set -e

# Need to upload TEMPLATES to S3 before validating due to template-body MAX 51K length
# https://docs.aws.amazon.com/cli/latest/reference/cloudformation/validate-template.html#options
Expand All @@ -22,6 +23,11 @@ for f in $TEMPLATES
do
echo -e "\nValidating CF template $TEMPLATE_URL/$f"
aws cloudformation validate-template --template-url $TEMPLATE_URL/$f
done

for f in $TEMPLATES
do
echo -e "\nPromote CF template to https://s3.amazonaws.com/$S3_BUCKET/$S3_BUCKET_PATH/$f"
aws s3 mv $S3_BUCKET_URL/$TEMP_DIR/$f $S3_BUCKET_URL/$f
done

Expand Down

0 comments on commit cfbf7b8

Please sign in to comment.