Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yaml file copies added into s3 prefix with CID_VERSION #1075

Merged
merged 2 commits into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion assets/build_lambda_layer.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# This script builids a lambda layer. Outpits relative path of layer zip.
# This script builds a lambda layer. Outputs relative path of layer zip.
export CID_VERSION=$(python3 -c "from cid import _version;print(_version.__version__)")
rm -rf build

Expand Down
7 changes: 6 additions & 1 deletion assets/publish_lambda_layer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@

# First build layer
layer=$(./assets/build_lambda_layer.sh)
# Source the version
export CID_VERSION=$(python3 -c "from cid import _version;print(_version.__version__)")


# Then publish on s3
export AWS_REGION=us-east-1
Expand All @@ -23,7 +26,7 @@ aws cloudformation list-stack-instances \
if [ $? -ne 0 ]; then
echo "Error: $output"
else
echo "Uploaded successfuly"
echo "Uploaded successfully"
fi
done

Expand All @@ -35,6 +38,8 @@ rm -vf ./$layer
if aws s3 ls "s3://aws-managed-cost-intelligence-dashboards" >/dev/null 2>&1; then
echo "Updating cid-cfn.yml"
aws s3 sync ./cfn-templates/ s3://aws-managed-cost-intelligence-dashboards/cfn/
# Publish additional copy into respective version folder
aws s3 sync ./cfn-templates/ "s3://aws-managed-cost-intelligence-dashboards/cfn/${CID_VERSION}/"

echo "Syncing dashboards"
aws s3 sync ./dashboards s3://aws-managed-cost-intelligence-dashboards/hub/
Expand Down
Loading