Tips for Deploying your .Net project
Over the last 20 years I’ve seen many a deployment, some good, some bad and the ugly, life’s too short for manual/long deployments.
Here is what I recommend
If you have manual steps in your deployments then stop it, now, no seriously, you can deploy with zero manual steps (clicking deploy doesn’t count).
What to do instead
Get yourself TeamCity, yes TeamCity, Jenkins is ok but you get what you pay for, trust me Jenkins isn’t TeamCity. Ok now that you have an excellent build server, you’ll want to script your builds, for this I liked using psake along with PowerShell, honestly people who don’t know PowerShell are missing out, its awesome.
So get your scripts together and kick the builds off from TeamCity using psake.
Unit Test your PowerShell Scripts
Using Pester you can unit test your PowerShell scripts, thus realising that their fragile or poorly written or just large function which are hard to test, well do yourself a favour and use pester to unit test them.
Pester also gives you code coverage for your PowerShell scripts
Deploy your app
To deploy any .Net app use Octopus Deploy, its easy, its painless, it deploys with error handling, rollback using transactions, and you can do blue/green deployments, if you want to deploy a previous release, one click, deploy to multiple environments, any previous version etc. all in one click.
Summary
To summarise, no more manual steps, no copying files, manually unzipping files, creating folders etc, – no need to do that, and leads to human error, highly recommend each of those tools.
[…] Tips for Deploying your .Net project (Gregor Suttie) […]
[…] Tips for deploying your .NET project by Gregor Suttie. […]
I am using Jenkins since the beginning. What are the benefits you got passing to TeamCity?
We use Jenkins at my current Job, its just nicer all round, it can do similar things but its just better at them, better tool integration such as psake, powershell, better everything in my opinion. Don’t get me wrong you can still use Jenkins to do what you want but TeamCity just feels smoother and If I had to recommend one over the other Id pick TeamCity every time.
[…] Tips for deploying your .NET project : Gregor Suttie 는 닷넷 프로젝트를 배포했던 경험에서 얻은 팁을 공유했습니다. […]
[…] 部署.NET工程的小技巧 Gregor Suttie著 […]
thanks for the tips and sharing your valuable experience .