Question
How can I include Xcode build error messages in the body of notification emails when using TeamCity?
Answer
For TeamCity On-Premises, it is possible to customize the email notification content to include build log entries such as ERROR/FAILURE messages. This can be achieved by modifying the FreeMarker templates (e.g., build_failed.ftl) located in the /config/_notifications/ directory. Detailed instructions can be found in the Customizing Notification Templates guide.
For TeamCity Cloud, this functionality is currently not supported. TeamCity Cloud does not allow modification of notification templates or customization of email content at this time. However, there is an open feature request for this functionality. You can follow and vote for it here: https://youtrack.jetbrains.com/issue/TCC-405.
Workarounds
If you are using TeamCity Cloud, you can consider the following alternative approaches:
-
Leverage Slack Notifications
Use Slack integration to receive detailed build failure information directly in your team's Slack workspace.
-
Implement a Custom Notification Workflow
Add a build step or script to your pipeline that parses the
xcodebuildoutput, extracts relevant error messages, and sends a custom email. This can be achieved using a mail script or an external service.
The above suggestions ensure better visibility of build errors depending on the specific TeamCity version you are using.
Comments
0 comments
Please sign in to leave a comment.