Today I’m beginning a series of posts on Continuous Delivery with Team Foundation Server and Windows PowerShell based on my open source project powerdelivery. The project is already in use at a business intelligence solution for a large healthcare provider.
In 2011 I was working at a large client who had a hard time releasing software. People would forget to make environment changes (like server patches, environment variables, and settings) when doing a production deployment that were in development, and vice versa. The production system would go down and everyone would stress out, and releases happened very infrequently because things were uncoordinated and fragile.
Around that time, I read the book on Continuous Delivery from Jez Humble and found within it a solution. It talks about using a Delivery Pipeline to promote builds through the environments your code runs in so that changes don’t get out of synch with each other. There’s many benefits and techniques to Continuous Delivery other than that, and many of them rely on having a team that follows SCRUM to release in sprints, defining their work with easily demonstrated acceptance criteria, and using automating tests that repeatably do so.
I loved the concepts in the book and wanted to start using them on my own projects. I work for Catapult Systems, a Microsoft Gold Partner as a consultant and our primary platform for builds is Team Foundation Server. Unfortunately TFS gives you an easy way to compile a project with test gates to one environment, but doesn’t give you much for coordinating the promotion of builds from one environment to the next like you’d need for a Delivery Pipeline. So I built one on top of it.
What’s Included
-
A framework for writing a single PowerShell script that deploys your software into multiple environments.
-
Templates with included build scripts that you can use as a starting point for your builds.
-
A mechanism for storing environment configuration settings in .csv files. For instance, your local computer, development, test, and production environment probably use a different database.
-
PowerShell cmdlets that help with writing builds.
-
Build process templates for Microsoft Team Foundation Server that trigger your script.
-
An Add Pipeline utility that will add powerdelivery to your Microsoft Team Foundation Server project.
Where do I get it?
Read the wiki and grab a copy (from source) off of github. You don’t have to compile anything to use it, but you’ll want to read the requirements in the documentation for getting TFS and PowerShell setup.