Building Deployment Pipelines for CI/CD

Shadman Jamil
3 min readApr 17, 2018

The adoption of CI/CD will change the way, how developers and testers deliver their applications. This enables the confidence of team members to reliably release their applications or infrastructure code at any time through the automated Deployment Pipeline. It is a key capability of a DevOps initiative, enabled by a DevOps ‘tool chain’.

We take advantage of the DevOps approach to enable the Continuous Integration, Delivery, and Deployment of applications to your clients, covering the gaps between Agile Development and Operations. With continuous integration, your code will be integrated with your repository and when you push your code to your repository it compiles source code, runs tests, and produces packages (if needed) that will be ready to deploy. In Continuous Delivery, your application release will be always ready, when to push the latest updates into your production environment is your business decision, so the final deployment could be a manual step (unless you make that automatic for your Continuous Deployments).

Similarly, a deployment pipeline is an automated implementation of your application’s build, test, deploy, and release processes. In other words, the deployment pipeline will help you to automate all the steps that will be required to release your application changes continuously.

We have various tools to implement CI/CD for your application’s automated deployments, where top 10 CI/CD tools are as follows:

  • AWS CodePipeline
  • Jenkins
  • Visual Studio Team Services — VSTS
  • CircleCI
  • GitLab CI
  • TeamCity
  • Codeship
  • Buddy
  • Wercker
  • Shippable

For more tools and details, you may read https://stackify.com/top-continuous-integration-tools/

Few Key Concepts & Practices for Continuous Processes

  • Small and Iterative Changes — One of the essential practices, when you are going to adopt continuous processes, is to encourage small changes. Developers should practice breaking up big tasks into small pieces and commit those changes early. Techniques like Branch by Abstraction and Feature Toggle help to protect the functionality of the main branch from in-progress code changes.
  • Master/Trunk-Based Development Approach — With this approach, work will be done in your main branch of the repository. Short-lived feature branches are acceptable as long as they represent small changes or specific features and are merged back as soon as possible.
  • Keep the Building and Testing Phases Fast — Each of the processes relies on automated building and testing to validate correctness. Since the build and test steps must be performed frequently, these processes must be streamlined to reduce the time we spend on performing these steps.
  • Operations (Ops) / DevOps Engineers — These people are fully responsible for the availability of the application for your end-users and their work revolves around the CI/CD, scaling it as necessary and designing the code logistics so that code from developers can move to a production environment which end-users may access and use without any downtime.
  • Use Staging Before Production Stage — Some important data and environments for testing and automating should be a mirror of your production environment as closely as possible. Most deployment pipelines have a ‘pre-production’ release before pushing it into a production environment.
  • Keep Your Delivery Super Fast — The build needs to be completed quickly so that if there is a problem with integration, it will be quickly identified and resolved.

The key to following the continuous delivery path is to continually question your own assumptions about what’s possible.

Things that should be cleared and the same for everyone:

Continuous Integration — Automates your build and testing of code whenever you commit any changes to your version control. By adding this step, you may detect errors/problems earlier and improve your quality.

Continuous Delivery — Automates your full application delivery life-cycle until the final stage but before the production environment, we will have a manual approval/trigger process to release the new features on demand.

Continuous Deployment — Automates your full application deployment till the production environment (without any manual approval work), your updates of the application will be pushed automatically to your production environment after passing all automated stages and tests.

The earlier you catch defects, the cheaper they are to fix.

Cheers!

--

--

Shadman Jamil

Tech Savvy, Software Architect, Mentor, and Entrepreneur