Integrate with TeamCity fluently
Get TeamCity builds with branches, status, start and finish date and paging
IList<IBuild> builds =
new RemoteTc()
.Connect(connect => connect
.ToHost("teamcity.jetbrains.com")
.AsGuest())
.GetBuilds(
having => having
.BuildConfiguration(
buildConfiguration => buildConfiguration
.Id("FluentTc"))
.Branch(branch => branch.Branched()),
include => include
.IncludeStatusText()
.IncludeStartDate()
.IncludeFinishDate(),
paging => paging
.Start(30)
.Count(10));Run custom build
IBuild build = new RemoteTc()
.Connect(connect => connect
.ToHost("teamcity.jetbrains.com")
.AsGuest())
.RunBuildConfiguration(
buildConfiguration => buildConfiguration.Id("FluentTc"),
agent => agent.Name("Agent1"),
parameters => parameters
.Parameter("param1", "value1")
.Parameter("param2", "value2"),
options => options.OnBranch("develop")
.WithComment("personal build on develop")
.AsPersonal()
.QueueAtTop()
.RebuildAllDependencies()
.WithCleanSources()
.OnChange(change => change.Id(123456)));Interact with TeamCity from within a build step without authentication
ILocalTc localTc = new LocalTc();
// Gets the current checkout directory
string agentWorkDir = localTc.TeamcityBuildCheckoutDir;
// Gets the current parameter value
int param1 = localTc.GetBuildParameter<int>("param1");
// Sets parameter value of the current build
localTc.SetBuildParameter("parameter.name", "value1");
// Gets list of files changed in the current build
IList<IChangedFile> changedFiles = localTc.ChangedFiles;
// Determines whether the build is personal
bool isPersonal = localTc.IsPersonal;
// Change status of the current build
localTc.ChangeBuildStatus(BuildStatus.Success);-
For more examples and documentation read the Wiki
The easiest way to get FluentTc is through Nuget: Visual Studio -> Manage Nuget packages or from Nuget Package Manager Console:
- For reporting bugs, create an issue on Github issues
- For contribution fork and submit a change via Pull Request
FluentTc adheres to Semantic Versioning 2.0.0, basically means that there are no breaking changes unless the version is 0.x or major version is promoted.
FluentTc is released under Apache License 2.0
FluentTc project keeps growing with the support of growing comminity of contributors
