0

I'm currently doing a plugin for TeamCity 8.1.4 to support our tool. The latter generates some JSON and HTML/CSS/JS files I would like to include in TeamCity UI through respectively a graph and some kind of frame I guess.

Our tool is supposed to generate these files in the directory of the project after each build is finished. I read in the docs that I could create "build artifacts", which are basically files kept on the server side. I figured I could then access them with getArtifactsDirectory() method from SBuild interface. The thing is, I have no idea how to instruct TeamCity to create a build artifact programmatically. Or maybe I'm thinking this backwards and there's another way to do this... I'd appreciate some pointers since the Plugin community forum looks dead.

LMeyer
  • 2,570
  • 1
  • 24
  • 35

1 Answers1

0

If you are looking to adding an HTML content to build results or projects, please check out this documentation page: 'Including third-party reports in build results'

Configuratoin described in this doc can be done using Java API:

  • see jetbrains.buildServer.web.reportTabs.ReportTabManager docs to configure tab settings on server side.
  • see jetbrains.buildServer.agent.artifacts.ArtifactsWatcher to publish files from build agent. This one is used to publish files as build artifacts.

UPD The abovementioned components can be used by plugin to configure 'third party report tab' (without any manual configuration). This way, plugin can provide html report from build without need to access uploaded artifacts.

Nikita Skvortsov
  • 4,768
  • 24
  • 37
  • Thanks for the answer. However I believe ReportTabManager is now called ReportTabUtil right ? – LMeyer Oct 01 '14 at 12:22
  • No. ReportTabManager is different bean, you can get it from Spring context. It has methods `createBuildReportTab` and `createProjectReportTab` which should be interesting for you. Also, see update in answer body. – Nikita Skvortsov Oct 02 '14 at 12:23
  • Thanks. I can't find ReportTabManager in [TeamCity's Javadoc](http://javadoc.jetbrains.net/teamcity/openapi/current/jetbrains/buildServer/web/reportTabs/package-summary.html) though... What gives ? – LMeyer Oct 02 '14 at 13:25
  • Looks like the ReportTabManager is not listed as open API and is considered internal. – Nikita Skvortsov Oct 03 '14 at 13:20