bmoers / sn-cicd

CICD Server for Service-Now
GNU Lesser General Public License v3.0
44 stars 35 forks source link

email notification in case slack is not available in the environment #24

Open nadimrizk83 opened 4 years ago

nadimrizk83 commented 4 years ago

Currently e-mail notifications works for failures (builds, deployments, preview, etc). Would it be possible to add e-mail notifications for the success criteria when build completes, pull request is open, pull request is merged, deployment in progress, and deployment complete?

The reason I am asking for this is because collaboration tools such as Slack is not available or allowed in the environment I currently work with and we would rather use e-mail notifications for now.

Please advise.

bmoers commented 4 years ago

You can override the Slack object in cicdInt.js https://github.com/bmoers/sn-cicd/blob/4a2510b9b699270cb21e842ca2db8f8a5acd6c72/lib/cicdInt.js#L16 to send email instead. Just make sure it implements the same functions as in slack.js https://github.com/bmoers/sn-cicd/blob/4a2510b9b699270cb21e842ca2db8f8a5acd6c72/lib/slack.js#L228

Would that work for you?

nadimrizk83 commented 4 years ago

Thank you very much for coming back to me on this; I would like to keep the slack functionality - I really like this integration in terms of collaboration and for future use - I would like to actually add the e-mail functionality rather than an override. In addition, can you please show me or provide me with the sample code example for implementing this as unfortunately I don't have the development background and skills required to make these code changes - I am more on the system integration side where I am trying to make this work for the team in place - I made it across various instances and I am very pleased with the results so far; but the only thing I am currently missing is the notification piece. If you can assist with this enhancement I would greatly appreciate it! Thank you again for your time.