Your builds and deployments should be standardized

In this blog post I would like to discuss about standardized builds and deployments.

I was surprised to see that many developers think that this only applies to big companies. I disagree with this view and I argue that you should start to standardize your development pipeline from the start even if you are a developer doing personal projects on the side.

What do I mean by standardized builds? 

I mean that all projects should be built, tested, deployed the same way. You shouldn't have to think about those aspects for each project. These steps should be defined globally and each new project needs to follow the same set of rules. 

Why it matters

What should the standardization include?

This can include as many items as you want but here is a list of common items you might want to include:

How to do it?

There are many ways to deal with this and it will probably depend on the technology stack that you use. That said I would like to share some aspects that I think you should take into account.

There are basically 3 parts for this: your code (NodeJS, Java,...), the automation tools (Jenkins, Ansible,...) , your running production engine (Docker, Cloud services,...). You don't want each part to be too dependent on the others. You think you won't change those technology stacks anytime soon but you might often want to optimize part of those regularly, so you don't want to have to spend time migrating old projects all the time.

My recommendation is to define some standardized entry points (these would be like interfaces), then your code would implement those interfaces and the tools would call them. Those interfaces might scripts (all projects should have the same set of scripts) or another option that I use is to use NPM's package.json (even for non-NodeJS projects).

Let's consider the following deployment steps:

Side Notes: