Continuous Delivery vs. Continuous Deployment – Similarities and Differences

When talking about CI/CD, there is often some confusion about the difference between continuous delivery and continuous deployment. It doesn’t help that the acronym ‘CI/CD’ doesn’t differentiate the two, and, sometimes, you might even see it written as ‘CI/CD/CD’ (continuous integration, continuous delivery, continuous deployment)!

So the question is, what is continuous deployment, how is it different from continuous delivery, and how do they both relate to continuous integration? More importantly, which one is best for you and your software? Let’s explore the answers to those questions in this post.

Continuous Delivery and Continuous Deployment: How are they Different?

A good way of looking at continuous deployment is an extension of continuous delivery. Regardless of which of them you choose to implement, they both require continuous integration as a starting point. If there isn’t consistent integration of new code into the mainline, neither continuous delivery nor continuous deployment is a viable solution. Continuous deployment requires new software to be released as soon as it’s available. Immediately after the code has been successfully integrated with the existing code, upgrades and changes go live and can be accessed by users.

Where continuous delivery differs from this is that when practising it, you don’t have to immediately deploy any changes to the software when they become available. However, they need to be deployable at a moment’s notice. Continuous delivery means having the ability to deploy software changes as soon as they become available. In other words, you build the new software and prepare it for immediate deployment but then wait for release instructions.

We can explore this difference by looking at the game ‘tip and run’ cricket. For those of you who are unfamiliar, tip and run cricket is a type of casual cricket in which the batsmen have to run every time they hit the ball, regardless of where it goes. As most people know, normal cricket allows the player to run when they hit the ball, though the game’s rules doesn’t force them to.

The comparison that can be made here is that in continuous deployment you have to deploy updates as soon as they’re ready – just like having to run as soon as you hit the ball in tip and run cricket. On the other hand, with continuous delivery, you are always ready to deploy but you don’t have to. This is like regular cricket where you have the option of running but can avoid doing so if you think that’s the best decision.

Continuous Delivery and Continuous Deployment: How are they Similar?

It’s difficult not to say how continuous delivery and continuous deployment are similar when describing how they’re different. Despite their clear differences, they are closely related. They both require the implementation of continuous integration before either of them can work. Both also require new or updated software to be available for release when it has finished integration with existing software.

The only major difference between continuous delivery and continuous deployment isn’t even in the process of software development. It’s actually in the differing personal preference of the team or individual who decides when updates should be publicly released. Even then, you can release software immediately when you’re using continuous delivery; you just might not do it every time.

The reason they are both so similar is due to continuous integration. The process of getting to the stage of deciding between continuous delivery or continuous deployment is the same. So, there’s only so much that you can change when the product is literally right there in front of you and ready for release.

Continuous Delivery and Continuous Deployment: Which is Better?

There is no definitive answer to the question of ‘is continuous delivery better than continuous deployment?’. Deciding on which one to use comes down to which industry you’re in, what your competitors are doing, and even just the personal preference of whoever makes the decision of which of the two to go with.

The way to decide between continuous delivery and continuous deployment is to figure out which one suits your needs best.

A visual difference between continuous delivery and continuous deployment. Image credit Stack Overflow

When Continuous Deployment Works

Using continuous deployment over continuous delivery should be the goal of almost every company not restricted by time or regulations. Running continuous deployment is most effective when there has been a change in the market or a problem has arisen. To solve such problems swiftly, new software goes into production immediately after passing all its integration tests. When the service is not fully automated from continuous integration all the way through to deployment, it slows down. The emergence of a problem, like your site crashing, makes it imperative to fix the issue as soon as possible. The best way to achieve this is full automation and the continuous deployment of minor changes. That way, you can quickly get your site up and running again.

Continuous deployment is a valuable process as it can remove the potential for time-wasting that occurs while waiting for an all-clear before implementing changes.  Instead, such changes get the green light as soon as they pass their tests and ready to go.

When Continuous Delivery Works

Continuous delivery is an effective method of deploying new software when you have to regulate your software’s release but still want to remain prepared for any potential issues that could present themselves in the near future. Continuous delivery is also useful for meeting release deadlines while avoiding the final, stressful 24 hours before release. You’ll avoid this stress as everything is already ready to go into production.

Continuous delivery is a valuable process purely because it can increase the quality of software updates. This is without constantly adapting to minor changes within the mainline as required with continuous deployment.

So, How Do I Choose?

Choosing between continuous delivery or continuous deployment is generally down the state of your company and development team. It’s impractical to try to use continuous deployment as a strategy if you’re not equipped to do so. That being said, you also shouldn’t continuous delivery if you’re able to implement continuous deployment.

There is a lot of debate on whether continuous deployment is a more effective long-term strategy than continuous delivery. Every article you’ll find will say something slightly different, with some chastising continuous deployment and stating that continuous delivery is best no matter the situation or vice versa. To get the most from CI/CD, you need to maintain fluid development strategies and adapt to changes within your industry. Once you accept that there is no definitive right or wrong answer, you’ll have a head start on your competition in deciding what is best for not just your software development team but your organisation as a whole.

If you’d like to discuss the best option for your team or company, get in touch and I’d be happy to help.

Would you like to know how CI/CD can benefit your company? Read here

No Comments

Post a Comment


Keeping in shape for you

© 2018 Peppe Uprooted