Skip to content

Instantly share code, notes, and snippets.

@borismod
Last active March 31, 2017 21:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save borismod/4023d16ed80e63668e45d54ab6dee941 to your computer and use it in GitHub Desktop.
Save borismod/4023d16ed80e63668e45d54ab6dee941 to your computer and use it in GitHub Desktop.
Download artifacts of latest successful build
using System.Collections.Generic;
using FluentTc;
using FluentTc.Domain;
public static void Main()
{
IConnectedTc connectedTc = new RemoteTc()
.Connect(to => to.ToHost("tc")
.AsGuest());
IBuild lastSuccessfulBuild = connectedTc.GetLastBuild(having =>
having.BuildConfiguration(with => with.Id("FluentTc")).Status(BuildStatus.Success))
IList<string> downloadedFiles = connectedTc.DownloadArtifacts(lastSuccessfulBuild.Id, @"C:\DownloadedArtifacts");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment