Create a Project Tab where the HTML artifact comes from another project

I am using TeamCity 7.1.5 enterprise.  I have an HTML report that is generated by Project X (via configuration X1).  I would like that HTML to be shown in a project report tab in Project Y (by referencing the artifact from configuration X1 if possible).  Is this possible?  If so, how can I go about doing it?

Ultimately, I want the HTML from configuration X1 to also be in report tabs for Project Z, Project A, Project B, etc.  I want to generate a report once, but have it available in report tabs for multiple projects.  I do not want to have to regenerate this HTML report for each project.

If there is a way for a project report tab to point to a system directory (say /opt/web/index.html) instead of requiring the HTML to be an artifact, that would be awesome!

Thanks!

4 comments
Comment actions Permalink

The Artifacts are accessible via Teamcity API http://confluence.jetbrains.com/display/TW/REST+API+Plugin

So you should be able to make a step in other builds using some scripting language, which gets the artifact of the HTML report build (find its ID in the build parameters tab in one of its executions), and include that report as an artifact as well. since they have an artifact of the same name, they would show the tab too.

0
Comment actions Permalink

Thank you for quick response!  I am trying to avoid running additional configurations just to move the HTML files from one configuration to another.  The reason is every time a configuration is run, it ties up an agent.  If I have 20 Projects that I want to publish this HTML in (as Project Tabs) and that HTML gets refreshed every 5 or 10 minutes, then I will tie up agents every 5 or 10 minutes with 20 more configurations just to grab the HTML files that already exist and are updated in the original Project X, config X1.  I'm looking for a way to access (without copying or running another configuration) of publishing the HTML files from Project X, configuration X1 in Project Y as a report tab.

0
Comment actions Permalink

Then probably you can use the messaging of Teamcity to publish the location of this artifact in any other configurartion (not X). You'd still need the REST API to get the original artifact (build X) to the agent that runs Y and then point to it in the configurations under Y, which will make the tab.

http://confluence.jetbrains.com/display/TCD7/Build+Script+Interaction+with+TeamCity#BuildScriptInteractionwithTeamCity-PublishingArtifactswhiletheBuildisStillinProgress

See:Publishing Artifacts while the Build is Still in Progress

0
Comment actions Permalink

Thank you for your help!  Ultimately we decided to go with a different solution.  We are hosting the generated HTML file on a web server.  The generated HTML file is being created every X amount of time using a configuration in TeamCity.  Now the trick.  We created another HTML file that auto-redirects to the generated HTML (which is on the web server now).  We save that redirect HTML file as an artifact in another project's configuration.  Now that second project can have a project report tab that points to the redirect HTML; which then redirects you to the generated HTML file in the web server.

This solves our problem and it allows us to view the report from outside of TeamCity.

0

Please sign in to leave a comment.