Programmatically Queue a build with a custom artifact dependency

TeamCity Gurus,

I'm building a plugin that queues instances of a build type which has an artifact dependency on another build type.

I'd like to programmatically set which build number should be used for the artifact dependency, as can be one in the Web UI (i.e use build #4 instead of the latest build).

This functionallity doesn't seem available through the public API but I've read the code in the this post:

but the setCustomArtifactDependencies method is confusing me as I don't know how I'm supposed to populate it's List<SArtifactDependency> parameter. Where would I get this list from? Why can't I give it a build number or ID as in the Web UI?


1 comment
Comment actions Permalink

Unfortunately this API is closed at the moment. To create artifact dependency you can use jetbrains.buildServer.serverSide.ArtifactDependencyFactory service. You'll also need to set destination paths in the created instances of SArtifactDependency.


Please sign in to leave a comment.