Triggering TeamCity job based on email subject - continuous-integration

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.

Related

How to Do Jenkins Save/Apply event from script

I am using this https://python-jenkins.readthedocs.io/en/latest/ python Jenkins API to create a job from XML config. Everything working fine except the webhook for Bitbucket server. I need to hit save/apply button at least once to activate the Webhook. Is there any way to call this Save/apply event through any script or API?
It would be a great help if anyone can suggest a solution.
This Problem is resolved with the latest update of Jenkins - Bitbucket server integration Plug-in

Jenkins Jira-trigger plugin "Build is scheduled for ..." stopped writing to Jira comment

Up until about this May, the Jenkins Trigger plugin was writing the "Build is scheduled for" message in Jira comment when the build was scheduled by a Jira webhook. It stopped working since then. I can write the comment to the Jira API so it looks like the issue in on the jira-trigger plugin. Anyone else seeing this?
I believe I found the solution. It looks like we need to login manually to the Jira site as the Jenkins user to clear out dialog boxes that were added when Jira changed licensing models.
I encountered a similar strange problem, the "Build is scheduled for" message and trigger job building work fine yesterday, but not work today. The Jenkins plugin log seem fine "Received Webhook callback from changelog. Event type: jira:issue_updated". But no "Build is scheduled for" message in Jira and no related Jenkins build trigger.
I check the Jira user in Jenkins config, then log in Jira, I find there is a notification about authentication in Jenkins. Bad Requestoauth_problem "timestamp_refused", I will check the time on Jira and Jenkins server.
Related link: oauth-error-oauth_problem-timestamp_refused

Jenkins email plug-in

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

How to trigger maven specific job in Jenkins with Gerrit

I'm currently using Jenkins(1.451) and the Gerrit Trigger(2.3.1) to launch builds from Gerrit in order to verify code.
This is working fine as long as the project in Jenkins is configured as a "Free style" project. However, I'm currently setting up a new build pipeline where I'm using the "Build a maven2/3 project" option in order to take advantage of maven specific properties which I can't get from the "Free style" option. For some reason, Jenkins doesn't seem to trigger builds using this option. Nothing at all happens when I submit code to Gerrit which under normal circumstances should be picked up. I'm actually wondering if the Gerrit trigger is meant to work with Jenkins projects configured as a maven2/3 job or maybe it is the case that I can only use the Free style option in order to do this.ge
Could anyone confirm if this is the case?
Yes this will work. I suspect you might have some authentication issues that causes your jobs not to be triggered.
Check you sshd_log in the gerrit config folder to see if there are any jenkins logins that result in immediate LOGOUT. I my case I forgot to add Stream Events rights to the Non-Interactive Users under All-Projects and this caused some strange behavior.
This was the message I saw 3x per second in my sshd_log:
jenkins a/1000002 gerrit.stream-events 0ms 0ms not-admin
See here for more details

Create JIRA issue for TeamCity build failures

Does anyone know how to setup TeamCity so that it would create a new JIRA issue for each build breakage/failure?
We are trying to categorize/track/get-stats on our build breakages and need some kind of db. JIRA would most likely do the job.
If you can configure TeamCity to emit an email on failure, you can add issues in Jira via email.

Resources