My ideal Continuous Delivery pipeline

You must be running a Continuous Delivery pipeline for your code. It makes your life way easier.

I have recently spent too much time explaining how it should work. And yet the concept is very simple. The ideal CD pipeline consists of only 3 stages:

  1. Build and Test

  2. Ask for human feedback

  3. Deploy to prod

This is simple to comprehend and yet covers all the variety you have in your process. The pipeline is triggered by a merge to master. All your dev process quirks fits nicely into that "before master" land. You can have feature branches, team branches, upstream patches, emailed patches - whatever it is. You are free to do what works for you and the CD process is not restricting you.

The Build and Test stage does ALL the builds and ALL the tests. Automatically. With no human intervention. It should deploy your code to Dev, Tst, Non-Prod, what have you, and run all the tests you have automated. It may break your Dev. But it is good to do that anyway, it promotes resiliency in your application design.

The human feedback stage is the crucial piece. I've seen so many people try to script out their "production release" gates. Have the binaries been signed? Have all the dependencies been deployed? Have all the tickets been closed? Only to fail. It either allows a change to go to prod when it should've not been, because nobody thought of scripting out that particular gate or the script had a bug. Or it hinders the team's ability to move fast. This happens more often. The team knows the changeset is all good to go, but the scripted gates don't let it through because of some external factor they can't control.

The pipeline presents to the human all the information gathered automatically and in one place. Which environments the code failed to deploy to? Which tests were red? Which tests took more time than expected? And the human makes the final call.

Then goes the prod deploy without any further action from the human.

Simple, yet it accommodates all the corner cases. I have seen so many reasons for holding off a deployment to prod... A marketing campaign, business hours on the other side of the Globe, the whole team drunk in a pub, a crucial sales demo under way, CEO wants to hold the "go live" ceremony - just to name a few. It is a waste of effort to script that all.

In the entire CD pipeline there should be just one stage for the human. Everything before is gathering the data so that the human can make the right call. Everything after is automated.

Just one buttton to rule it all.

Posted On


Tags: /