QualiSystems / FluentTc

:ocean: :two_men_holding_hands: :office: Integrate with TeamCity fluently
https://www.nuget.org/packages/fluenttc
Apache License 2.0
44 stars 35 forks source link

Enable VCS Root with SSH Key Authentication #111

Closed raelyard closed 7 years ago

raelyard commented 7 years ago

Issue details

I want to use FluentTC to create VCS Roots with uploaded SSH Key

Relates to issue

close #110

Checklist

Example of using new/modified functionality

var vcsRoot = connectedTc.CreateVcsRoot(__ => __
                .AgentCleanFilePolicy(AgentCleanFilePolicy.AllIgnoredUntrackedFiles)
                .AgentCleanPolicy(AgentCleanPolicy.Always)
                .AuthMethod(AuthMethod.TeamcitySshKey)
                .Branch("refs/head/develop")
                .BranchSpec("+:refs/head/feature/*")
                .Id("VcsRootId")
                .IgnoreKnownHosts()
                .Name("VcsRootName")
                .ProjectId("ProjectId")
                .CheckoutSubModule()
                .UploadedKey("keyName")
                .Url(new Uri("http://www.gooogle.com"))
                .UseAlternates()
                .UserNameStyle(UserNameStyle.AuthorName));
raelyard commented 7 years ago

Apologies for the delay. Accepted all your feedback except for renaming the method. Gave my comment there in that the name matches what is in the TeamCity UI and I expect that is probably preferable.