forked from aws/aws-toolkit-vscode
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: add post-release notification buildspec (aws#6609)
Will enable for prod once I confirm it outputs the proper messages. --- - Treat all work as PUBLIC. Private `feature/x` branches will not be squash-merged at release time. - Your code changes must meet the guidelines in [CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines). - License: I confirm that my contribution is made under the terms of the Apache 2.0 license.
- Loading branch information
Showing
2 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
version: 0.2 | ||
|
||
phases: | ||
install: | ||
runtime-versions: | ||
nodejs: 20 | ||
|
||
pre_build: | ||
commands: | ||
# Check for implicit env vars passed from the release pipeline. | ||
- test -n "${NOTIFY_URL}" | ||
- test -n "${TARGET_EXTENSION}" | ||
|
||
build: | ||
commands: | ||
- echo "TARGET_EXTENSION=${TARGET_EXTENSION}" | ||
- EXTENSION_NAME=$([ "$TARGET_EXTENSION" = "amazonq" ] && echo "Amazon Q" || echo "AWS Toolkit") | ||
- VERSION=$(node -e "console.log(require('./packages/${TARGET_EXTENSION}/package.json').version);") | ||
- CHANGELOG=$(cat packages/${TARGET_EXTENSION}/CHANGELOG.md | perl -ne 'BEGIN{$/="\n\n"} print if $. == 2') | ||
- MESSAGE=$(envsubst < "$GITHUB_WORKSPACE/buildspec/release/notify.txt") | ||
- DATA="{'Content':'${MESSAGE}'}" | ||
- | | ||
# TODO: Enable for prod only after testing | ||
if [ "$STAGE" = "prod" ]; then | ||
echo "SKIPPED (stage=${STAGE}): 'curl -v POST \"[SLACK_URL]\" -H \"Content-Type:application/json\" --data $DATA'" | ||
exit 0 | ||
fi | ||
curl -v POST "${NOTIFY_URL}" -H "Content-Type:application/json" --data $DATA |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Released ${EXTENSION_NAME} v${VERSION} for VSCode | ||
|
||
${CHANGELOG} | ||
|
||
Changelog: https://github.com/aws/aws-toolkit-vscode/blob/master/packages/${TARGET_EXTENSION}/CHANGELOG.md | ||
Release Arifact: https://github.com/aws/aws-toolkit-vscode/releases/tag/${TARGET_EXTENSION}/v${VERSION} |