Created
June 14, 2013 14:03
-
-
Save adoprog/5782041 to your computer and use it in GitHub Desktop.
TeamCity API - Get Artifacts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var buildConfigId = this.Url.RequestContext.RouteData.Values["id"] as string ?? "bt1"; | |
var client = new TeamCityClient("http://your team city server"); | |
// Connect with Guest Authentication | |
client.Connect(string.Empty, string.Empty, true); | |
var config = client.BuildConfigByConfigurationId(buildConfigId); | |
foreach (Build build in client.SuccessfulBuildsByBuildConfigId(buildConfigId).Take(5)) | |
{ | |
var artifacts = client.ArtifactsByBuildConfigIdAndBuildNumber(buildConfigId, build.Number); | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment