Praqma / questionnaire-engine

Containerized web application to create and analyze surveys
6 stars 3 forks source link

SPIKE: Sending mail from CircleCI to person who commited #170

Closed edipetres closed 6 years ago

edipetres commented 6 years ago
  1. Use this command to get the email address of the person last commited: git log HEAD^..HEAD --pretty='%aN <%aE>' | sort -u | grep -o -P '(?<=<).*(?=>)'

Note: the command only works for me on the circle ci server - remove last grep command to make it work on other distributions

  1. Use this tutorial to install linux package that can send email.

@buep Which Praqma account can I use for sending the email?

edipetres commented 6 years ago

Ok, so I created a MailJet account to send emails with a curl command from the pipeline. Credentials are documented in the Readme and added to the it-administration page.

This is what an email looks like:

Greetings! 

Your pipeline has finished building your release candidate. 

Follow this link and click on HOLD -> Approve to approve the release: 
https://circleci.com/workflow-run/02289571-ab94-47d9-840a-196283a8430f

EDIT: Leaving this issue open to be reviewed by @buep

buep commented 6 years ago

That is a fine start I think :-) I guess you found credentials for sending mails?

edipetres commented 6 years ago

Mails are sent from the newly created MailJet account ;)