0

I've used Jenkins CI for a few years and I want learn TeamCity.

In Jenkins I tracked FxCop issues by enabling code analysis on my .net projects and then telling the Violations plugin where to find the code analysis XML files i.e. MSBUILD would put a file named [project name].CodeAnalysisLog.xml in the build output directory and you could use something like **/*/*CodeAnalysisLog.xml to find those files with the Violations plugin.

TeamCity has its own FxCop runner but I don't want to run FxCop again because MSBuild has already done that for me.

I just want to be able to tell TeamCity where to find the XML files and have it produce the trend graph in the same way Jenkins does with the Violations plugin.

I have a similar issue with StyleCop, jsLint and cssLint. MSBuild build tasks or batch commands that run as part of the build produce XML output. I would like to use this output to create trend graphs.

TheMagnificent11
  • 1,424
  • 4
  • 19
  • 40
  • Can you please tell how you achieve JSLint and CSSLint in complitation and generate the XML output? I have done for FxCops and StyleCop. But no proper nuget package found for JSLint and CSSLint – Karthik Feb 10 '17 at 11:56
  • There's probably a couple of ways to do JS and CSS linting. I install jsHint and cssLint using npm and then ran the (I used "jsHint" and not "jsLint" because that's what Visual Studio Web Essentials used to use back in the day). For cssLint I used the following command to generate XML: `csslint --format=lint-xml --ignore=%ignoreRules% %cssFile% > %xmlOutputFile% || EXIT 0`. For jsHint I used the following command to generate XML: `jshint --reporter=jslint %jsDirectory% > %xmlOutputFile% || EXIT 0`. – TheMagnificent11 Apr 09 '17 at 23:01

1 Answers1

0

To my knowledge TeamCity is different from Jenkins for the reports in a sense that it takes them in HTML format. That's what we have had to do for our code quality analysis product - convert our XML report to HTML for TeamCity. Due to that we can't do violation trend report when integrated with TeamCity unlike the Jenkins plug-in we have. We haven't looked whether there were TeamCity changes in the last couple of years that would enable the XML report input.

sergeb
  • 2,484
  • 3
  • 22
  • 20
  • In the case of Jenkins, it just need the XML and it produced the trend graph. Are you saying that for TeamCity I need to generate the report myself from XML and just get TeamCity to use it? – TheMagnificent11 Oct 17 '14 at 00:17
  • Yes, you'd need to convert that XML to HTML before importing into TEamCity. That's what we do. – sergeb Oct 18 '14 at 07:23
  • Alas, if only Jenkins could detect Git branches like TeamCity does. Getting drop-down-list branch build parameter in Jenkins requires too much configuration. – TheMagnificent11 Oct 20 '14 at 00:33