Introduction To CI/CD

Introduction to CI/CD

In modern software development, flexibility, speed, and quality are the major requirements to build and integrate complex applications. To cope with the rapidly changing nature of developments, CI/CD comes into the picture as it is becoming increasingly popular and essential for developers to know and understand.

What is CI/CD?

CI refers to Continuous Integration and CD refers to Continuous Delivery. CD is often referred to as continuous deployment. Continuous delivery and continuous deployment are two different terminology

  • Continuous Integration is the first stage of the software delivery path where the developed application is tested, built, and integrated.
  • Continuous Delivery is the second stage of a software delivery path where the application is deployed to its production environment which is utilized by the end-users.
  • Continuous Deployment is a software development practice where software is automatically released to production continuously.

Talking about old school software development lifecycle process includes sets of different team working on different areas and features of the product. Teams include the development team, build & integration team, operation team, project management team, and quality assurance team. During the lifecycle, project management team sets the functional roadmap of the products by doing market research and customer surveys. Quality assurance works closely with the product management to make sure product management is getting what they asked for. Developer’s work on different areas, features, or bug fixes of the product and integration team manually integrating all these changes can be a near-impossible task, and there will inevitably be conflicting code changes with developers working on multiple changes. The whole software development lifecycle can last anywhere from a couple of weeks to a couple of months. One such cycle is called an iteration.

Pain points

  • Manual integration needs huge time and effort
  • Issues are fixed at the end of the Iterations
  • Intermediate merge issues can hold up teams as its leads to broken builds
  • Long Feedback for functional defects
  • Longer iterations leads to higher time-to-market for the business

Taking about old school SDLC delivery section, once the code is built and integrated the release package was passed on to the operation team with set of instructions for different environments setups. The whole process starting from preparing the environment to deployment is manual which leads to issues mentioned below:

Pain Points

  • Correctness of instructions
  • Difference in instructions across environments
  • Error prone nature of manual task
  • Deployments are sophisticated. High-impact with downtime

In Modern software development, Continuous Integrations and Continuous delivery provide an ideal solution for the issue faced earlier.

Cardinal principles of continues integration

  • A single central repository (version control system (VCS) eg. GitHub, GitLab, BitBucket) where the code lives
  • Developers check-in and commit their code changes frequently
  • Build should be triggered every time a developer checks in code
  • Build should be automated and fast
  • Build should compile the code as well as run automated
  • Fixing a failed build should be top priority for the developers
  • Build results including automated test results should always be visible to all developers. In case of failures, developers should receive a notification

Cardinal principles of continuous delivery

  • Manual introductions were replaced with automated scripts which can be verified at creation time
  • Automated scripts can easily pick the task for each environment
  • Automation prevents the occurrence of human errors
  • Automated deployments, easily repeatable, lesser time-to-market

Note
CI/CD plays a key role in modern software development where it helps to improve developer and QA productivity, lessen time consumption and resources, contribute to overall good code quality, shorten feedback cycles, be less error prone, heighten the ability to support varying architectures and platforms, and ensure the application’s reliability.

There’s a common term called “Automation” which makes the development process much easier for the team and allows them to deliver the features much faster.