In a previous post, I introduced Xcode Server bots and mentioned that an integration can fire an email trigger — for example to notify team members of successful integration completion or of exceptions encountered as the integration ran.
In that previous post I presented this diagram to illustrate an Xcode server automation that builds an app after a git branch is pushed to a remote repository on GitHub. Note the step in the bottom-right corner, which sends an email to the development team to communicate the outcome of the automation, or the overall status of the project.
What Do Email Triggers do for me?
Xcode server is typically run on a dedicated machine, e.g. a Mac Mini or cloud-based Mac server, so configuring the Xcode server to communicate the outcome of automations to the development team is critical to keeping forward progress on the development project.
An obvious choice to send status reports from Xcode server to development, QA and product teams is email, and Xcode server supports email reporting triggers out-of-the box.
Xcode Server provides two built-in email notification trigger types:
- New Issue Email. An email is sent when new issues are found. The intended recipient(s) for this type of trigger are the team members that introduced issues via source code contributions to the git repository.
- Periodic Email report. A summary of current project progress, intended to be sent to the broader team responsible for product development.
Configuring an automation email trigger
Configuring a trigger is really easy. While on the last tab of the integration configuration screen:
- Tap the plus (+) button to create a new trigger.
- Select either New Issue Email or Periodic Email Report.
- Select the types of issues that should trigger a new -mail each committer who introduced and issue.
In the case of a Periodic Email Report:
4. Select how frequently the summary report should be sent: after each integration, daily or weekly.
5. Since the trigger is a period report, the report can be sent to a broader audience, so you can add a list of email addresses/distribution lists in a way similar to sending an email from a standard mail client.
What do I get out of this?
After the bot is configured and saved (which sends it to the Xcode server for scheduling), Xcode Server will send emails according to the configuration steps made above.
Email will be delivered to your email box, and the delivered email will look similar to the following example of a compile error summary:
Configuring your Xcode server to send email
The above discussion is focused on configuring bots with triggers that send email. But you do need to configure Xcode server so it has an authorized path to send the mail it’s configured to. I’ll discuss how to do this in the next post in this series: Configuring Xcode Server to send email.