Skip to content
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.DS_Store
env
base.zip
*/gen
Expand Down
12 changes: 10 additions & 2 deletions aws/logs_monitoring/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,23 @@ if [ "$PROD_RELEASE" = true ] ; then
echo "Release aws-dd-forwarder-${VERSION} to github"
go get github.com/github/hub
rm -f aws-dd-forwarder-*.zip
zip -r aws-dd-forwarder-${VERSION}.zip .
zip -r aws-dd-forwarder-${VERSION}.zip . \
--exclude=*tools* \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is will work well enough, but would it make sense to whitelist files instead?

--exclude=*tests* \
--exclude=*.DS_Store* \
--exclude=*.gitignore*
hub release create -a aws-dd-forwarder-${VERSION}.zip -m "aws-dd-forwarder-${VERSION}" aws-dd-forwarder-${VERSION}
TEMPLATE_URL="https://${BUCKET}.s3.amazonaws.com/aws/forwarder/latest.yaml"
FORWARDER_SOURCE_URL="https://github.com/DataDog/datadog-serverless-functions/releases/download/aws-dd-forwarder-${VERSION}/aws-dd-forwarder-${VERSION}.zip'"
else
echo "About to release non-public staging version of forwarder, upload aws-dd-forwarder-${VERSION} to s3, and upload the template.yaml to s3://${BUCKET}/aws/forwarder-staging/${VERSION}.yaml"
# Upload to s3 instead of github
rm -f aws-dd-forwarder-*.zip
zip -r aws-dd-forwarder-${VERSION}.zip .
zip -r aws-dd-forwarder-${VERSION}.zip . \
--exclude=*tools* \
--exclude=*tests* \
--exclude=*.DS_Store* \
--exclude=*.gitignore*
aws s3 cp aws-dd-forwarder-${VERSION}.zip s3://${BUCKET}/aws/forwarder-staging-zip/aws-dd-forwarder-${VERSION}.zip
TEMPLATE_URL="https://${BUCKET}.s3.amazonaws.com/aws/forwarder-staging/latest.yaml"
FORWARDER_SOURCE_URL="s3://${BUCKET}/aws/forwarder-staging-zip/aws-dd-forwarder-${VERSION}.zip"
Expand Down