Reputation: 2200
I wanted to add email notification for me and my colleagues for Travis CI Build. Whatever the result is failure or Sucess of Build we should get notified. Should i need some extra settings in my git account? What to add for email notification in Travis and where?I mean any file or i can add in .travis.yml file?
Thanks
Upvotes: 1
Views: 2933
Reputation: 2200
I have added email-notification to .travis.yml file in repository
notifications:
email:
recipients:
- [email protected]
on_success: always
on_failure: always
Upvotes: 2
Reputation: 312
Your answer is correct, just adding a possible pitfall when you have multiple e-mail addresses and you don't receive an e-mail notification:
Travis CI only sends build notifications to email addresses registered on GitHub. If you have multiple addresses registered you can set the email address for a specific repository using git:
Note that this also changes the commit email address, not just the Travis CI notification settings.
git config user.email "[email protected]"
Or set the email for all of your git repositories:
git config --global user.email "[email protected]"
Note that we currently don’t respect the detailed notifications settings on GitHub, as they’re not exposed via an API at this point.
Official documentation: https://docs.travis-ci.com/user/notifications/#Configuring-email-notifications
Upvotes: 2