jonoropeza.com

Making software and software development teams. Mostly the people parts.


Adding CI & CD is a zero hour task

I've written previously about the importance of continuous deployments in software projects and how, in addition to enabling rapid delivery of value, they play a part in enabling high availability / high uptime systems. Call this a doubling down then.

Adding CI & CD has become a zero hour task for anything I'm building. Meaning that during the first hour of coding on any new deployable, I add continuous integration and continuous deployments.

Why? My experience is that the longer you wait to add CI and CD to a project, the more complexities you've built and the more decisions you've made that might conflict with how you'd like to do CI and/or CD.

Not to mention the habits that have been built by everyone working on the project, and the culture that's been built around how testing and deployments are done around here.

In other words, it just gets harder, and sometimes it gets impossible intractable - technically, culturally or both - to do CI or CD the way you want to do it and should do it.

Whereas if you build CI and CD in from the start, then as long as you're keeping your commits tidy (you are keeping your commits small and digestible, right?) any decisions you make or paths you take that might stray you from CI/CD will be immediately obvious - you'll have a broken build.

This works for all code: data pipeline code, terraform, a web service or a web experience (React with or without Next.js, Vue, Angular, etc). If it's code and you're going to run it somewhere (and if not, why write it?), then test it every time you go to change and, if the build is green, run it automagically when you commit it.

For web services or experiences it's so easy. Init the repo. Install the boilerplate. Then write a test that exits 0. Tell Github to run it automatically on PRs and commits to main. Add a Dockerfile, docker-compose, yaml for Cloud Run or AWS or Azure, done.

If you or your shop write more than 5-6 projects a year, all of this should be in your grab & go toolbox when you do File -> New Project.

It might be a bridge too far, but I'd hazard to say that simple observability should be an hour zero task as well. Or maybe hour one. Nothing elaborate: give me an alert, preferably in Slack or Teams or whatever I'm using, that lets me know if my deployment is red. A simple ping will do.

posted in Software Development