BuildResult-Plugin: How to display content of a file created during build?

Hi there,

I would like to add a new page to the Build Result view. So far I could create a new Tab on the web UI of the Build Results by adding a new class derived from ViewLogTab. I also created a JSP file for the plugin that displays (dummy) data from the model provided by the plugin class in fillModel().

The goal of the plugin is to display the content of a file that is created during a build process on this new tab. The file created is not supposed to become an artifact or being checked in to the VCS. So it resides in the agent's work directory after the build is finished.

How could I access hte file's content in my new plugin class - the one mentioned above that extends ViewLogTab and adds the new Tab to the Build Results view.

I understand that there must be something special (or impossible?) to this, since for the Build Log there seems to be all the specific classes related to Build Logs...

Does anybody have an idea on how to schieve this or whether it is possible at all?

Thanks a lot in advance!

Take care,

Comment actions Permalink

Well to transfer a file from agent to the server you will need some kind of a server software on the agent itself, and you will need to communicate with this software from the server. Or you can put your file to a network share. However I think it is much easier to publish your file as artifact, note that with help of service messages you can do this right from the build script while the build is still running.

Why you do not want to publish it as artifact? Probably it contains some sensible information or the file is too big?

Pavel Sher

Comment actions Permalink

Hey Pavel,

thanks for your reply!

The reason why I would prefer to not store the file as an artifact is that it is not supposed to be accessed otherwise than as a part of the build result. I understood that artifacts are some kind of "output" from the build process - something one wants to get from a build. In my case the file contains the results of some coding style checker utility. And I would like to present them as part of the build results. The results-file alone (as artifact) does not really serve anyone. Also, I'd like to transform the content of the file prior to display on the newly introduced tab of the build results page.

This is similar to how the build log is accessible through the build results page/build log tab (and there's also no "buildlog-file" as artifact). I was just wondering whether there might be a way of transporting data collected during build to a place where the server can access it later on.

Maybe it would help to subclass one of the build runners (if I find documentation on how to achieve this)?



Please sign in to leave a comment.