-
Notifications
You must be signed in to change notification settings - Fork 313
Add sample CI build with notification script #298
Conversation
Thanks very much. This has been very useful to our group. I would suggest adding the following to facilitate mail being sent to the most recent committer upon build failure: |
@u550ccer NP. I like your suggestion. How about pulling author's email address directly from the commit that is being built in CI? Something like this:
I think this would be less error prone. |
@colddata, Agree - your solution is better. We also made a few other mods that you might be interested in. Our build is substantial - so large that adding the text to the email causes a mutt transmission failure. To deal with that, we write our build output to a file which is then attached to the notification e-mail. Since our build takes a while, we had requests for notifications when the builds kick off. So, we added a pre-build e-mail which includes the time that the build started. Since that could lead to concern that the build hung, we also send emails on both success or failure of the build. Finally, some of our more active developers were getting confused by which commit kicked off which build. To handle that, we added the commit message to the e-mails. |
@jvanbaarsen @Razer6 Please keep in mind that this PR includes a sample CI build script with email notification being only a small portion of it. The latter can obviously be disabled inside this script. We, personally, found preferred handling of the entire build event within one central script. |
@demisx Can you please remove the emailing part of this PR? Since that is already supported in CI |
This merge request has been closed because a request for more information has not been reacted to for more than 2 weeks. If you respond and conform to the merge request guidelines in our contributing guidelines we will reopen this merge request. |
This CI build script is invoked by GitLab CI on each build run and meant to be project specific. The script will run common build tasks (bundle install, rake db:setup and rake rspec) upon each invocation, but you may easily modify the build() function to add your own steps. When the build fails, and email is sent to configured recipients. Instructions are inside the script.
This is a stab to address requests similar to issue #222