The plugin enables a new type of build trigger. Currently, it supports only the HTTP(S) subscription type.
This plugin allows triggers from multiple SNS topics and supports basic build customization for them.
Compatible with TeamCity 2022.04 and greater.
- Download the Amazon SNS Trigger plugin.
- Install it as an additional TeamCity plugin.
After that, a new trigger type is automatically added for your build configuration in TeamCity.
To configure Amazon SNS Trigger in TeamCity, do the following:
- Go to the build configuration.
- Add
Amazon SNS Trigger
. - Copy the generated HTTP(S) link.
- Add a new subscription for your SNS topic in the AWS console (see the subscription link in a trigger configuration).
- Save the trigger configuration before sending a subscription event.
You can configure more than one trigger of this type.
The trigger introduces new build parameters:
%sns.message.subject%
- extracts the Subject value from an SNS message.
%sns.message.body%
- message body from the SNS message.
%sns.message.attributes.<name>%
- message attributes. Replace <name>
with the actual attribute name.
Feel free to use them at your will.
The values are extracted as-is from the SNS message, so all values are passed as strings (null values are passed as empty strings).
TeamCity doesn't support attributes with the dot (.) symbol in the name.
sns.message.attributes.<name>
is a dynamically named attribute and can't be used in static context, like build
configuration.
If you want to use values from attributes in a build configuration, create a custom property and initialize it via '
Trigger Configuration' -> 'Build Customization' -> 'Build Parameters'
This project uses Gradle as the build system. You can easily open it
in IntelliJ IDEA
or Eclipse.
To test and build the plugin, execute the build
gradle command.
We appreciate all kinds of feedback, so please feel free to send a PR or create an issue.