The deployment pipeline: The basis for successful software development
Tags: beginners, programming, testing, git
Published: 2019-04-12 09:04:31

---
title: The deployment pipeline: The basis for successful software development
published: true
description: Learn about how the deployment pipeline ensures that any changes we make to our software reaches the user as quickly as possible. 
tags: beginners, programming, testing, git
canonical_url: https://blogs.itemis.com/en/the-deployment-pipeline-the-basis-for-successful-software-development 
---

Imagine that you are visiting the production line of a major car manufacturer. You enter the production hall and see no assembly line, no manufacturing robots, no quality assurance: instead, everyone just appears to be tinkering.

After a few years of production, the various parts are combined into a car and handed over to the plant manager for acceptance. They test-drive it for a few meters, after which the car gives up the ghost.

Fortunately the automotive industry doesn’t work this way – and it shouldn’t look like this in software development either.

This is because “assembly line”, “manufacturing robots” and “quality assurance” have already arrived in the world of software development, in the form of __deployment pipelines__, __build automation__ and __automated tests__.

## The deployment pipeline

The deployment pipeline ensures that any changes we make to our software as developers reach the user, and as quickly as possible.

Code quality and functionality are tested along the way: in the best case this is fully automated.

It is important that every change is fed directly into the entire system. We achieve this as follows.

## Configuration management

Everything from build script to test files is managed using a versioning system such as Git.

Why do we do this?

Because it ensures that all changes are traceable, including those to the infrastructure or the build process, and everything can be edited from anywhere at the push of a button.

A simplified branching strategy can look like this:

![Process from develop to test to release](https://info.itemis.com/hubfs/Blog/Software%20Development/Grafik-Git-01.jpg "Process from develop to test to release")

Development is shown by the _Develop_ branch. As soon as a release is pending, a version number is assigned and merged to _Testing_. This branch is for test purposes only: after the software has passed its automated tests, it is delivered to test users.

Problems and bugs with the version are then resolved exclusively on this branch and then merged back to _Develop_. On the _Develop_ branch work can continue in parallel on new features for the next release.

If the test phase is successful, the _Testing_ branch passes the software on to the _Release_ branch and the software is delivered to end users.

## Build automation

Tools such as __Gradle__ and __Maven__ allow the software to be built on a build server both locally and automatically. After each code change, a build process is triggered to ensure that the change compiles successfully.

This is the first test of a change before it goes forward to testing.

## Automated testing

[Component and integration tests](https://blogs.itemis.com/en/never-write-unit-tests) ensure that the code does what it should and doesn’t change existing functionality.

Any new functionality must be covered by tests, to guard against future changes unintentionally impairing them. Automated tests should run in an environment that is closest to the production environment, and manual testing should be kept to a minimum.

After all, who wants to do manual testing?

Frameworks such as Espresso (Android) and SWTBot (Java) can remove most of the manual workload.

## Delivery

After the code has successfully passed its tests it will be delivered to users, again automated as far as possible.

For example, if the software is an Android app, it will be published on the Play Store and users will receive an update notification.

In the Eclipse environment, users will get the update via the corresponding update site.

There are now enough tools to help automate delivery: for example, Jenkins and Co offer various plug-ins to support this.

Building on the branching strategy, a simplified deployment pipeline can look like this:

![Deployment pipeline](https://info.itemis.com/hubfs/Blog/Software%20Development/Grafik-Deployment-Pipeline-01.jpg "Deployment pipeline")

Delivery to test users is shown as optional. The ideal is that all functionalities are covered by automated testing, completely eliminating manual testing.

The most important thing in the diagram, however, is the feedback loop. Feedback ensures that we always know whether we are moving in the right direction: the faster the feedback, the better.

In the fictitious automotive example at the start of this article, feedback came much too late and the individual parts were assembled only at the end. This more or less ensured the delivery of a non-functional product.

## Conclusion

A deployment pipeline of the sort described here allows us to achieve the goal of releasing software at the push of a button at any time.

The basic idea behind this is described well in the [Agile Manifesto](http://agilemanifesto.org/iso/en/manifesto.html):
>_Our highest priority is to satisfy the customer through early and continuous delivery of valuable software._

This is made possible by:
+ Continuous integration
+ Fast feedback
+ Automation
+ Sound testing 

A “green” build status guarantees us that everything works in the best way. This warranty depends solely on the structure of the deployment pipeline and the quality of the testing. Methods such as [test-driven development](https://blogs.itemis.com/en/model-driven-software-development-meets-test-driven-development) can be helpful here.