Is there any way to enumerate the contents of what will be checked out when a build runs?

Hi :)

I'm writing a Build Runner Plugin, i.e. the type of plugin described here:

UX sessions have shown that users struggle to configure the build step correctly, and I'd like to make it easier for them to do so.

The user needs to specify a project file (similarly to the "Solution file path" when using the built-in "Visual Studio (sln)" build runner).

Is there any way to get a list of the files that will be checked out onto the agent when the build runs (that way I could look for files with the correct file extension, and list them in the page to configure the build step, and then all the user has to do is chose from the list as opposed to needing to work out what files there will be where, etc).

I appreciate that I can get a list of the modifications, and go through all of these, but if the build has just been created (which is quite likely), this obviously won't show anything useful.

What's the best way to do this?

Thanks in advance!

1 comment
Comment actions Permalink

Hi David,

Until recently, there were no API to list files in the TeamCity VCS integration code.

In 7.1 EAP we have added such support for some version controls in the scope of TW-13852.

In the latest EAP build you can try to use code like ((VcsAccess)buildType).listFiles("") in your plugin to get the list.

This is a young part of API and it is not yet open API as you can see, so any feedback is welcome.


Please sign in to leave a comment.