This document discusses continuous delivery practices for .NET projects. It covers using Git for version control, protecting branches, conducting code reviews, running static analysis and unit tests, and deploying using tools like Octopus Deploy. Challenges of using Visual Studio Team Services are also mentioned. The recommended setup combines GitHub, SonarQube, Fake, xUnit, TeamCity and Octopus.
8. @skalinets 8
“Not invented here” syndrome
Microsoft
rn
GUI servers, RDP
Massive IDE
F5 Run, F9 Breakpoint (VS)
Project files on the right
Rest of the world
n
SSH, console
Code editor (vim, sublime)
F9 Run, F5 Breakpoint (Delphi)
Project files on the left
10. @skalinets 10
CD Flow
Create PR
Run Static Test Analysis, Unit Tests
Code Review
Merge into dev branch
Prepare deployment artifact, version it
Deploy to dev
Run acceptance tests, approve build
Promote to next environment (QA, Stage,
Prod)
11. @skalinets 11
Version Control
public string GetMostSuitableVersionControl(
int teamSize,
bool teamIsDistributed,
ApplicationType applicationType)
{
return "git";
}
15. @skalinets 15
Expected Code Review Flow
Pull request is created
Reviewers are invited
Reviewers put their comments
Author resolves comments
Pull request gets merged to dev branch
16. @skalinets 16
Code Review Problems
“Need to fix” status
Build status reporting
Track comment resolution
17. @skalinets 17
Another Core Review Tools
Gerrit from Google
Upsource from JetBrains
Crucible / Fisheye from Atlassian
18. @skalinets 18
Code Analysis
Support for C# out of the box
Roslyn based C# analyzer
Supports R# checks, FxCop, StyleCop etc
SonarLint plugin for Visual Studio
33. @skalinets 33
Teamcity
Dependencies
Small resource consumption
Abitlity to run more than one agent on the same
machine
Very user friendly (configuration via files, windows
service management via cmds, and so on)
34. @skalinets 34
Problems
Hung builds cannot always be cancelled
Artifact / snapshot dependencies mess
Hard to switch between admin and project
views
50. @skalinets 50
Key features missing / complicated
Needed to setup branch filter for
deployment
“New” UI did not have that option
at all
“Old” UI had that option but ONLY
for VSTS repository
51. @skalinets 51
Key features missing / complicated
Workaround – add custom tag
during build that is equal to
branch name and use that tag
as deployment filter
Now it got fixed (4 years from
the project start)
52. @skalinets 52
Other issues
Queued builds when all agents are idle
Sporadic hangs of agents
Random deployment errors
Test result reporting
UX issues
56. @skalinets 56
My Choice
Github for code / reviews
SonarQube for code analysis
Fake for build
xUnit for unit / integration tests
Teacity for CI
Octopus for deployment