Create JIRA issue for TeamCity build failures - teamcity

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.

Related

Rest api to get sonarqube info from bamboo build or vice versa

Is there any way I can get any sonarqube api which can provide the build number of bamboo or any bamboo api which can give sonarqube info.This would really help.
I have so far tried both side but i am surprised both the system are quite clueless about each other. Why it is not possible that a build which ran sonarqube as as one of it's job doesn't have any information about that. Also neither in sonar it tell which build has actually triggered that sonar execution
(Not sure I understand what exactly you are looking for, perhaps this ...? )
I don't believe you can relate a specific Activity (SonarQube analysis) to a specific build (Bamboo), just project to job.
You must have SonarQube Server configured in Bamboo
When executing your job, you can add these sonar.links optional parameters to the analysis step:
sonar.links.homepage Project home page.
sonar.links.ci Continuous integration.
and
sonar.links.scm Project source repository.
sonar.links.issue Issue tracker.
Maybe also specify sonar.host.url=$SONAR_HOST_URL (where SONAR_HOST_URL is the global setting in Bamboo) in the analysis step parameters.
Those populate the Project Overview page sidebar:
That should provide the links from SonarQube back to the other systems of interest.
If you have properly configured Bamboo, you should see a link in Bamboo to the SonarQube project, post execution.

teamcity.pullRequest.number is not identified in Teamcity

I'm trying to trigger the build for each pull request and in that build i want to access the pull teamcity.pullRequest.number
teamcity.pullRequest.number parameter is not identified in Teamcity even after adding the pull request build feature.
I'm using the TeamCity Enterprise 2019.1.3 (build 66439).
Please suggest how to access these teamcity parameters.
Thanks in advance.
After googling I came to know that the parameter teamcity.pullRequest.number is available in 2019.2 and above versions.
As I'm using the lower version I'm unable to access it.
for more info click here

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.

Team City Build and Octopus deploy

Team city is often used for building and then use Octopus for deploy. I wonder if I can use a successful octopus deploy to trigger a team city build? If it is possible, how to do this? Thanks.
You could use an integration between Octopus Subscriptions (basically webhooks) to call off to TeamCity's API, but you'd have to create that manually, there's no built-in "connectors".
I'd question why you want to do this though?
You could simply add a script step at the end of your deployment which would call the TeamCity URL to trigger a build.
There appears that there is also a community step in the library for doing a HTTP GET or HTTP POST.
Ensure you set the Run Condition to Success so that it will only be triggered when the full deployment has been completed.

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

Resources