I wrote too much so I'm prefacing this with the simple question: How do I query the REST API to get the artifact names for a given build?
I'm adapting a current build/deploy process from CC.net to TeamCity and am stumbling a bit on getting the artifacts to my deploy script.
The scenario is currently a manual deploy using a script that takes an environment file to determine where to deploy. The first thing it does is go and grab the latest, or optionally specified revision, package then prompt the user to verify and deploy to N machines as needed.
With CC.Net the artifacts all lived on the filesystem (build box is deploy box, for now) and I just searched that drive for either the latest package or a package containing the rev number. Now with TeamCity I no longer have the ability to just search the filesystem, which is fine, but the problem is the artifact filename (a .7z archive) contains a timestamp and I don't know what the filename is.
I messed around with the REST API and I like that I can query for build information, I envision the user prompt now being a sort of picklist of builds with the default being 'last successful'. However, I can't seem to find a way to list the artifact filenames and thus cannot download the artifact directly. I did figure out how to download 'all artifacts in a zip file' but since my artifact is already an archive that means I now have to unpack twice during deployment.