How to trigger a Team City build from TFS?

Hello all.
At the moment I have Team City project of test automation scripts triggered by Build Schedule of Team City. Test reports (build logs) are also generated in Team City project. I would like to have Team City project being triggered after each release of new SW version in TFS.
Is there any possibility to trigger Team City build from TFS?
Is it possible to read the status of build (passed/failed) or entire build log from Team City project in TFS?
Thank you in advance for any tips.

1
1 comment

Hi,

 

if you are using TFS for storing the code, which is what I understand you do, then yes, it should be possible by using the VCS Trigger instead (or additionally to) the Schedule trigger. More information here: https://www.jetbrains.com/help/teamcity/configuring-vcs-triggers.html

 

TeamCity will normally poll the server for changes following the "Checking for Changes interval" configuration on the VCS Root configuration. If you want to trigger directly from some sort of script or event run on TFS, teamcity has a REST API that allows to trigger builds, and, in particular, commit hooks are a URL that when requested with specific parameters can trigger a "Check for changes" event in TeamCity, that, combined with a VCS Trigger will trigger a build on commits instead of depending on the polling mechanism. This shows the commit hooks documentation: https://www.jetbrains.com/help/teamcity/configuring-vcs-post-commit-hooks-for-teamcity.html?Custom%20Chart%3FshowChildren=false

 

Posting the build status to TFS should be possible, you need to add the Commit Status Publisher build feature: https://www.jetbrains.com/help/teamcity/commit-status-publisher.html

0

Please sign in to leave a comment.