I would like to know if it is possible to send an e-mail notification to certain users when there is a modification to a particular directory within a repository in Stash. I know it is possible to write a shell script within Jenkins project to do this and then inform through e-mail but I would like to know if there is a native option within Jenkins configuration to this action.
2 Answers
This is possible within BitBucket Server itself as of May 7, 2013:
Repository subscriptions
[...] At times, you may want to receive emails on specific types of messages you care most about including:
...
Commits – when a new commit is added or a comment is left
...
See also Manage Inbox and email notifications.

- 1
- 1

- 14,080
- 5
- 48
- 107
-
Hi, thanks for the answer. But could you let me know which version of Stash(BitBucket) that you are using. I am using v2.12.3 but i cannot find all the options under Manage Account section. – Müller Apr 27 '16 at 05:46
-
@Aditya I'm using Stash 3.1 and it isn't there either. Functionality isn't added to older versions just because of a product rename or merge. – Gerold Broser Apr 27 '16 at 10:36
You can use Poll SCM under Build Triggers section. Define a job that uses GIT plugin, specify a workspace and machine so it'll always be synced with the latest, and poll every 2 minutes. if there is a change in the repository the job will be triggered. Add a post build action to send emails using the built in email notification or using Email-ext plugin. Don't forget to edit the SMTP information under Manage Jenkins->Configure.
You can check Here for more information about Jenkins Polling.

- 6,577
- 1
- 20
- 21