すべてのバージョン
Bamboo 5.13Bamboo 5.7.x
Bamboo 5.6.x
More...
If you want to customise the layout and content of your Bamboo notifications, you can customise the templates for each of the notification types (i.e. HTML email, text email, instant message) and events (e.g. Build Commented). The notification templates are written in Freemarker.
Some content in notifications can also be configured via system properties, such as, the number of log lines to include in email notifications that display log information.
On this page:
To modify a notification template:
WEB-INF/classes/notification-templates/templates/notification-templates folder of your Bamboo home directory, e.g. HOME/templates/notification-templatesAfterXFailedHTMLEmail.ftl
The Bamboo notification templates are written in Freemarker. The Freemarker engine allows for dynamic content generation based on the Freemarker markup tags that are used in templates. This document does not describe the Freemarker language in detail. Please see the Freemarker Online Manual for full information on using this markup language.
Generating content via Freemarker involves merging a template (*.ftl file) with a context map. You can access any data in the context map from within the template using the Freemarker markup. For the notifications we have provided a specific subset of Bamboo objects that you can access. For example,
[#if buildSummary.successful]
${buildSummary.buildResultKey} was successful.
If you had a successful Bamboo build with build result, BAM-1234-1, the above markup would return the following text in your notification:
BAM-1234-1 was successful.
You can find more information on working with Freemarker, including Bamboo objects available from Freemarker templates, tips on writing Freemarker templates and examples in the Freemarker and Notification Templates document.
The following system properties can be configured to control some of the content that is included in notifications (e.g. the number of log lines to include in email notifications that display log information). For instructions on how to configure a system property, please refer to the Configuring System Properties page.
Before you begin:
The system properties below do not add content to notifications. You still need to ensure that your notification templates contain the relevant entities to display the content. For example, changing the bamboo.notifications.logLinesToInclude property will not add log information to your notifications. It only modifies the number of log lines displayed in notification templates that already include logs.
System Property |
説明 |
既定値 |
|---|---|---|
|
Specifies the number of log lines to include in email notifications that display log information. |
100 |