teamcity

FxCop and Code Analysis Rules

你。 提交于 2019-12-04 23:19:56
问题 I recently started using Code Analysis on my projects in Visual Studio. I have created a custom ruleset to use with all of my projects that include two of the Microsoft defined rulesets. I've been working to integrate FxCop into the CI build process to fail builds that don't pass all rules. What's really odd to me is that I can't use my ruleset to define what rules FxCop scans the code against. How do I make it so Visual Studio's Code Analysis rules match up to FxCop's rules? 回答1: You already

Running and reporting Visual Studio 2012 Code analysis in TeamCity

巧了我就是萌 提交于 2019-12-04 22:56:11
问题 What is the best way to run and report Visual Studio 2012 code analysis in TeamCity? 回答1: Since FxCop or Code Analysis integrates directly into MsBuild, it's probably as simple as adding /p:RunCodeAnalysis=Always or /p:RunCodeAnalysis=True to the MsBuild commandline when building the project. Since this will generate standard compiler warnings, TeamCity should pick them up automatically. 回答2: Visual Studio 2010+ Code Analysis is (based on) FxCop 10.0. You can simply add a 'FxCop' build runner

How to run a build step conditionally in TeamCity

醉酒当歌 提交于 2019-12-04 22:32:42
This is a more generic version of this question: How to run a build step on a specific branch only? For example, I can use a PowerShell script to run MSBuild if '%teamcity.build.branch.is_default%' -eq 'true' or if '%teamcity.build.branch%' -eq 'master' but then I will miss the collapsible log that comes with the TeamCity MSBuild build runner. Isn't there any easier way to conditionally run a build step? Alina Mishina It is not possible to execute build step based on condition. Vote for the related request: https://youtrack.jetbrains.com/issue/TW-17939 . The recommended approach is to create

How to get TeamCity Build trigger filter to build feature branches but not default branch

我与影子孤独终老i 提交于 2019-12-04 20:49:38
问题 I've created a Team City build to build the feature branches: Default Branch: refs/heads/development Branch Specification: refs/heads/feature/* I have a vcs trigger so it builds for every git push. But I don't want it to build when someone pushes to the development branch. I have tried playing with the branch filter in the trigger, but either features and development build on push, or none of them do. I'm using TC 9.1.1 回答1: Try the following settings: Default Branch: refs/heads/development

Failed build trigger in team city TeamCity

烂漫一生 提交于 2019-12-04 18:26:02
问题 Is it possible to Trigger an exe to run on a failed build? Can you do this within Team City? 回答1: If you specifically want the failed builds, you can set up the dependent build as Eric said, and have that secondary buildscript use the REST API to pull up a list of the failed builds for the actual project. If the latest build is in that failed builds list, then tell the build script to run the executable. If not, then you're all done! http://confluence.jetbrains.net/display/TW/REST+API+Plugin

TeamCity artifact from lastSuccessful branch build

痞子三分冷 提交于 2019-12-04 17:40:34
问题 I recently re-configured our TeamCity build configuration to take advantage of the Branch features to apply the same build configuration to multiple branches in the same repository. Now, I'm trying to setup an automated build script that can pull the latest artifact from TeamCity, but only for a specific branch. I was able to get it working fine on the default branch in the original configuration, using the TeamCity REST API, but can't figure out how to format the URL to pull the artifact for

How to compose git log for pending changes in TeamCIty

流过昼夜 提交于 2019-12-04 17:35:36
问题 I have a TeamCity agent configured to build my XCode projects and I use github. I would like to automatically include in my release notes the descriptions from all pending commits in TeamCity. How can I fetch them from github and store them in teamcity? Once I put them in a teamcity variable I can easily add them to my build script. 回答1: You could use the "Adding or Changing a Build Parameter from a Build Step" feature in order to update some build parameters right from a build step. You

TeamCity - how to get currently running builds via REST API?

我的未来我决定 提交于 2019-12-04 17:28:20
问题 Does anyone know how to use the TeamCity REST API to find out which builds are currently running, and how far through they are (elapsed time vs estimated time)? Ta Matt 回答1: The URL returns what you are asking for, including percentage complete. http://teamcityserver/httpAuth/app/rest/builds?locator=running:true <builds count="1"> <build id="10" number="8" running="true" percentageComplete="24" status="SUCCESS" buildTypeId="bt3" startDate="20110714T210916+1200" href="/httpAuth/app/rest/builds

How do I integrate my Postman Integration Tests with TeamCity

最后都变了- 提交于 2019-12-04 17:03:31
I'm building a suite of integration tests in Postman to test some RESTful APIs. I'd like to run these tests when building the project in TeamCity. I'm looking at perhaps using Newman command line integration, but I not finding good examples of this. Can anyone suggest an approach to make this happen? I was able to get this working using newman and grunt. I added newman under exec, and also added a grunt task in my gruntfile. This needed to point to the local instance of the newman npm package (not global). 'use strict'; module.exports = function (grunt) { // eslint-disable-line grunt

Can I include the mvn deploy:deploy-file in the pom or settings.xml instead of cli goal

好久不见. 提交于 2019-12-04 16:09:37
问题 I need to deploy a custom jar to Artifactory along with the jar generated from my Java project. Currently the only method I can find is through command line goal using: mvn deploy:deploy-file -DgroupId=<group-id> \ -DartifactId=<artifact-id> \ -Dversion=<version> \ -Dpackaging=<type-of-packaging> \ -Dfile=<path-to-file> \ -Durl=<url-of-the-repository-to-deploy> Is there a way of including this in the pom file? As a plugin or something? 回答1: Sure. Just define an execution of the maven-deploy