Skip to content

Commit 8a50ddd

Browse files
authored
add another copy of yaml files into s3prefix (version) (#274)
1 parent 7b3d360 commit 8a50ddd

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

data-collection/utils/release.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@ export STACK_SET_NAME=LayerBuckets
77
export CENTRAL_BUCKET=aws-managed-cost-intelligence-dashboards
88

99
code_path=$(git rev-parse --show-toplevel)/data-collection/deploy
10+
version=$(jq -r '.version' data-collection/utils/version.json)
1011

1112
echo "sync to central bucket"
1213
aws s3 sync $code_path/ s3://$CENTRAL_BUCKET/cfn/data-collection/
14+
aws s3 sync $code_path/ s3://$CENTRAL_BUCKET/cfn/data-collection/$version/
1315

14-
15-
16+
echo "sync to regional bucket with version prefix"
1617
aws cloudformation list-stack-instances \
1718
--stack-set-name $STACK_SET_NAME \
1819
--query 'Summaries[].[StackId,Region]' \
@@ -24,6 +25,7 @@ aws cloudformation list-stack-instances \
2425
--region $region --output text)
2526

2627
aws s3 sync $code_path/ s3://$bucket/cfn/data-collection/ --delete
28+
aws s3 sync $code_path/ s3://$bucket/cfn/data-collection/$version/ --delete
2729
done
2830

29-
echo 'Done'
31+
echo 'Done'

0 commit comments

Comments
 (0)