Skip to content
This repository was archived by the owner on May 12, 2018. It is now read-only.

Conversation

demisx
Copy link

@demisx demisx commented Oct 14, 2013

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

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling 6340dce on colddata:master into c018965 on gitlabhq:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling 8ece365 on colddata:master into c018965 on gitlabhq:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling 8ece365 on colddata:master into c018965 on gitlabhq:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling 8ece365 on colddata:master into c018965 on gitlabhq:master.

@u550ccer
Copy link

@colddata,

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:
MAIL_TO=$(git log -1 --pretty=tformat:%ae)

@demisx
Copy link
Author

demisx commented Oct 16, 2013

@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:

git show  --pretty=tformat:%ae [commit_hash] | head -n 1 

I think this would be less error prone.

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling bd62826 on colddata:master into 32058ef on gitlabhq:master.

@u550ccer
Copy link

@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
Copy link
Contributor

@demisx The current release of gitlab-ci has email notification build in. So not sure if this PR is still relevant. @Razer6 What do you think?

@demisx
Copy link
Author

demisx commented Jan 13, 2014

@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.

@jvanbaarsen
Copy link
Contributor

@demisx Can you please remove the emailing part of this PR? Since that is already supported in CI

@jvanbaarsen
Copy link
Contributor

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants