diff --git a/serverless/release.sh b/serverless/release.sh index 6b4f22d..edbe988 100755 --- a/serverless/release.sh +++ b/serverless/release.sh @@ -114,12 +114,13 @@ if [ "$PROD_RELEASE" = true ] ; then MACRO_SOURCE_URL="https://github.com/DataDog/datadog-cloudformation-macro/releases/download/serverless-macro-${VERSION}/serverless-macro-${VERSION}.zip'" else VERSION=${CI_COMMIT_SHA:-$(whoami)} - echo "About to release non-public staging version of macro, upload serverless-macro-${VERSION} to s3, and upload the template.yml to s3://${BUCKET}/aws/serverless-macro-staging/${VERSION}.yml" + MACRO_SOURCE_URL="https://${BUCKET}.s3.amazonaws.com/aws/serverless-macro-staging-zip/serverless-macro-${VERSION}.zip" + TEMPLATE_URL="https://${BUCKET}.s3.amazonaws.com/aws/serverless-macro-staging/latest.yml" + # Upload to s3 instead of github + echo "About to release non-public staging version of macro, upload serverless-macro-${VERSION} to s3, and upload the template.yml to s3://${BUCKET}/aws/serverless-macro-staging/${VERSION}.yml" tools/build_zip.sh "${VERSION}" aws s3 cp .macro/serverless-macro-${VERSION}.zip s3://${BUCKET}/aws/serverless-macro-staging-zip/serverless-macro-${VERSION}.zip - TEMPLATE_URL="https://${BUCKET}.s3.amazonaws.com/aws/serverless-macro-staging/latest.yml" - MACRO_SOURCE_URL="s3://${BUCKET}/aws/serverless-macro-staging-zip/serverless-macro-${VERSION}.zip" fi # Upload the template to the S3 bucket @@ -139,7 +140,7 @@ else fi echo "Done uploading the template, and here is the CloudFormation quick launch URL" -echo "https://console.aws.amazon.com/cloudformation/home#/stacks/quickCreate?stackName=datadog-serverless-macro&templateURL=${TEMPLATE_URL}" +echo "https://console.aws.amazon.com/cloudformation/home#/stacks/quickCreate?stackName=datadog-serverless-macro&templateURL=${TEMPLATE_URL}¶m_SourceZipUrl=${MACRO_SOURCE_URL}" echo "Done!"