Jenkins email plug-in - continuous-integration

I work on a big project with many other developers and we are using Jenkins as our continues integration tool. We have many automated test suite which are run by Jenkins every day. The question is how can we configure Jenkins to send automatic emails to the specific developer/s who has/have checked in some code which caused test case failure? Can we do it be using the email plug-in?

Yes. In "manage Jenkins" add SMTP server and in "configure" of a job, add email address in the "email notification" section. You can add more than one email, separating by a space.

We use Jenkins and a mailing list software (mailman). We have configured Jenkins to send emails (notifications) to a mailing list. Each project have 2 lists with the convention name: ProjectName-build-activity#... and ProjectName-tickets-activity#...

I would strongly recommend the email-ext plugin for more advanced configuration. It has very fine control over whom (commiter,author,default recipients etc.) to send email corresponding to the different possible results(failure,regression etc.).

Related

Triggering TeamCity job based on email subject

I'm newly implementing TeamCity and earlier was using Jenkins to implement CI. So I'm looking to know if there is any option (preferably inbuilt) to trigger TeamCity jobs by polling my mailbox and trigger when there is some mail with subject ::Ready to START::.
In Jenkins we have some plugin to poll our mail box and trigger the build, couldn't find similar option in TeamCity. Please help.

VSTS use of only the "Build & Release" Feature, Notifications for external GitLab Users?

Hy
When we would like to use VSTS only for the Build & Release Part and connect to GitLab as the external source control system (we use the 5 free user licenses to set up the build and release definitions and do not have additional user licenses):
Does a User (which does not have an vsts user account/license) who triggers a build through his code-change in the external gitlab, receives for example a build notification mail (with all the information regarding the build/release error), when his build fails?
If this does not work, is the conclusion, that we need a vsts user license for each user in gitlab?
Thanks for your help.
Peter
VSTS can only send the email to the user that started the build if it knows who the user is.
So if you want the build to send the email to the correct person yes, you would need the have a user in VSTS to the build to be assigned to.
To make sure the 5 users can work between VSTS build/release and GitLab, you just need only one VSTS account. Details as below:
Email addresses for the 5 users
You need to know the 5 user's email addresses for following use.
Sign up for VSTS account by an email address
Sign up with an email address and the user will be the VSTS account owner.
Add other 4 user's email addresses in the VSTS account
Now add other 4 users in the VSTS account. You can refer Add users to your account.
Note: the email addresses in the same domain (such as all of them are Microsoft accounts) can make it easier to add users to a VSTS account. Else you can refer Add an external user to your VSTS account.
To set email notifications, you can specify in Notifications Hub
(https://account.visualstudio.com/_notifications).
Such as to add a notification to user1 when he queues build fails, you can add a subscription as below:
And if a build is queued manually, you can also find who queued the build in the build summary page:

running protractor test with teamcity

I want to run my protractor test (remote server) using teamcity project.
I'm new to teamcity. I want to call the scripts from teamcity.
can I just refer the script at its location without having 'checkout directory'? since I don't do checkout, I just want to run the scripts and control it remotely.
what is the best way to combine protractor tests with teamcity? the target is to make it run on hourly basis and use the results - send it on mail, run again if failed etc.
thanks.
You can run test from teamcity targets without checking out any code. You can leave the vcs settings as blank if you want to .
Teamcity targets can automatically send email for test failures to individuals or groups. Normally emails are sent to developers who have commits in a particular run, however since you are not tying in any VCS to your build step, you can sign up a group of people who will receive a mail whenever tests fail using the "Notifications" tab

TeamCity: email notifications to non registered users

Is it possible setup TeamCity e-mail notifications to VCS users which doesn't registered in TeamCity?
VCS user name is a first part of e-mail: vasily.pupkin -> vasily.pupkin#company.com
Jenkins has settings for this case: 'Default user e-mail suffix'. May be TC has similar settings?
What I do not want to do:
force all users to create account
create all accounts manually as admin
setup LDAP synchronization now (I need quick, temporary solution)
If possible, you could create a TeamCity user with an email address that is a distribution list. Then you maintain that distribution list outside of TeamCity. In this way you can configure e-mail notifications for this user and it will be sent to the distribution list.
Hope this helps!

Making gitolite trigger teamcity builds

Rather than having teamcity log onto the gitolite server several tens of thousands of times each day - and also sitting around waiting for the poll to happen (or starting it manually).
It would be nice if it was possible to set it up gitolite hooks that inform TeamCity that the repository has changed.
Is such a configuration possible with TeamCity and gitolite?
I know Jenkins has a github plugin that works nicely - I use that setup for some Minecraft CI I am running privately.
One way would be to gitolite (through a VREF hook) to call TeamCity through its REST API, in order to launch a build through web request.
You just need to make web request to the following URL:
http://YOURSERVER/httpAuth/action.html?add2Queue=btId
, where btId is build type Id – unique identifier for each build configuration.
To get it, you can just look for it in browser address bar, when clicking on build configuration, or use TeamCity REST API for details.
The OP Morten Nilsen didn't need a VREF:
add a file "post-receive" to .gitolite/hooks/common and
run gitolite setup --hooks-only

Resources