I am using TeamCity and YouTrack.
I would like when build fails in TeamCity to be automatically created bug in my youtrack system, same way as TFS does.
After registering YouTrack with TeamCity but this does not work for failed builds just gives me.
Any idea how to do this?
I'm not sure there is straight out of the box functionality to do what you require.
But after reading some information, what you could do is setup a build that has a "Finish Build" trigger that would always execute after your first build finishes. (Regardless of success or failure).
Then in that second build, you could use the TeamCity REST API to determine if the last build execution from the first build was successful or not. If it wasn't successful then you could use the YouTrack REST API to create the issue.
TeamCity API Here: http://confluence.jetbrains.com/display/TW/REST+API+Plugin
YouTrack Create Issue API Here: http://confluence.jetbrains.com/display/YTD4/Create+New+Issue
Related
I have project hosted on Bitbucket and I'm using Upsource for reviews/pull requests. Is there a way how to setup TeamCity to build branch which is on review?
I saw guide fro the Github which is sadly not applicable to Bitbucket since adding +:refs/pull/*/merge didn't change anything.
I would like to have work-flow like this.
Create review
TeamCity runs build
Icon in Upsource indicates that build was ok
Here's my project's TeamCity configuration:
TC calls my script (FAKE - F# Make) to build & test my project.
As the final step, the same script creates a NuGet package.
Then I use TC's "Build Failure Conditions" mechanism to see if e.g. the total number of unit tests is not less than in the previous build.
Even if my build fails while running the last step, the NuGet package is published as an artifact.
I guess this is not the case - the build failed, so anything it provides shouldn't be considered as reliable.
I've found a similar question asked ~5 years ago:
How do I set TeamCity to not produce build artifacts when the build fails?
which says there was no built-in mechanism in TC to support that. Has anything changed during this time ? Can't find anything on the net.
I use TeamCity 9.0.
My only solution to this would be to separate out the deployment of the package to NuGet as a separate build configuration. That way, you can setup your dependencies/triggers within TeamCity so that it never deploys if the build step you have in place fails.
The artifact will still be created on the TeamCity side, since, as you stated, I cannot find a way to prevent that if the build fails. However, your actual NuGet deployment will never execute if setup this way because the dependency will prevent it with the build failure.
I'm looking for a tool of some kind that i can integrate into our CI process to keep track of the manual steps we have.
As an example, we want to run through some manual test scripts on the integration server before pushing the version to the test server. Currently QA gets a notification when the build is done, executes the manual testing and then tells someone to push the version to test if it's okay.
What i would love to find is something that will keep track of when the manual tests have been successfully completed and automatically push the version to test.
It should will be possible to notify/trigger the tool from Visual Studio Online and have it trigger the next step in VSO as well.
I've been googling various different things, but can't seem to find anything close to what i'm looking for. Todo list tools like Asana doesn't seem to have the integration point we need, but maybe i'm just missing something?
You can use the new Release Management tools in conjunction with test cases to get what you want.
In VSTS you can create test cases to reflect the steps of the tests that you want and then create a Test Plan or Suit to reflect the list of tests that you need to run manually.
Then as part of your release process you could create a custom task that waits for a Test Run to be completed against you list. If that test run has all pass then move to the next step, if any tests fail then fail the release.
This should be fairly easy to setup and you need to call the API to check the Test Run. If your Testers use Microsoft Test Manager you can also have the results associated with the Build that you are deploying and get full traceability.
You can try with the Release Management tool in VSTS. It can achieve partial features you want.
I assume you have three steps in your build definition:
Build solution
Publish to integration server
Publish to test server
You can keep the first two steps in build definition. And then create a release definition in Release Management and add the third steps in it. Configure the definition to "Continuous deployment" and link it to your build definition. Assign your QA to be the approver for this release task. Now, a release task will be created as soon as a build task completes. But it will be pending for the approver (Your QA) to approve. Approve the release task after the test is passed, the build will be published to the test server. Otherwise, reject it.
I want to make automatic comment in redmine issue after build in teamcity. For example teamcity made build for branch , I want to make comment in redmine about build result in issue/xyz. What is the best way to do that?
You will need to create a new build step at the end that will run some sort of script or program that you'll need to make.
What the script will do is make use of the TeamCity REST API to get the changes. (See this)
Then you can use the Redmine REST API to update the issue based off the changes found using the TeamCity REST API.
We are using TeamCity Enterprise v.9.1.1
Is there a way to trigger some action after build is complete?
I have tried adding last build step but it executed before artifacts are published.
Update: I am not looking for deployment solution. I need a way to specify generic action on build completion.
There's no generic solution at the moment.
You might want vote for the Post build task feature.
Possible workarounds include:
adding dependent build configuration (using Trigger)
creating new TeamCity plugin (e.g. custom notifier plugin, such as teamcity-slack-integration one)