What is CI/CD pipeline?

A CI/CD pipeline combines continuous integration and continuous delivery, automating software delivery across coding, testing and deployment.

Developing a business app can be difficult and time consuming. From conception and predesign, through to design, development phases and testing phases, and finally culminating in rollout and on-going support and maintenance, the entire process can take months.

CI/CD is designed to change all of that. A combination of continuous integration (CI) and continuous delivery (CD) practices, a CI/CD pipeline consists of a series of automated steps designed to greatly simplify application development. Using the operating principles and practices of CI/CD, DevOps teams can more quickly, frequently and easily deliver finished software products with fewer errors.

As previously stated, the CI/CD pipeline incorporates both continuous integration and continuous delivery to create a more-encompassing software development culture and set of operating principles. But what exactly are CI and CD, and how do they relate to continuous deployment?

What is continuous integration (CI)?

Continuous Integration (CI) is an approach in which development teams regularly implement and test incremental changes to the code. These changes are then merged to a shared, central repository. The repository is version controlled, allowing developers to view updates and go back to earlier versions when necessary. These iterations, called ‘check ins’ can occur multiple times per day during the development cycle. Every change is verified by an automated build and tests to ensure that issues in the code may be quickly identified and resolved.

What is continuous delivery (CD)?

While CI automates development and testing, Continuous Delivery (CD) closes the cycle, by automating aspects of software delivery. As feedback is addressed and fixes are implemented, these changes are automatically uploaded until the team makes the decision to push the application to production. CD results in a deployable product but depends on human authorisation to roll out products, allowing teams to decide what should be released and when. This enables developers to continue to refine the application before handing it over to the end user.

What is continuous deployment?

Continuous deployment is similar to continuous delivery, so much so that they are sometimes used interchangeably and represented by the same abbreviation (CD). The major difference between continuous deployment is in who actually deploys the software. Instead of requiring human authorisation to release a product, continuous deployment sends every change through an automated pipeline to create a working version, which is then pushed immediately into production. There is no holding for a manual approval cycle, which means that the code itself must be sufficiently tested prior to entering production.

Why is a CI/CD pipeline important?

Both CI and CD are essential to modern DevOps, and help support Agile methodologies. As such, an effective CI/CD pipeline brings with it several advantages:

  • Clearer processes
    The systematic CI/CD approach clearly lays out each step within the pipeline, providing a detailed overview of exactly what needs to be done to guide a project from conception through to completion.
  • Higher-quality code
    Small, incremental changes are easier to review for quality and effectiveness. Likewise, any problems in the code are much more apparent, and can be resolved earlier in the process. This means better code throughout the project.
  • Easy access
    With changes automatically stored in a central repository, stakeholders, QA and other authorised teams and individuals have direct access to every version of the product, including the most up-to-date release.
  • Reliable version control
    In the event that an issue with the code cannot be easily resolved, rolling back to an earlier version may be necessary. Effective version control practices ensure that this can be done with a minimum of hassle.
  • Faster feedback
    A CI/CD pipeline allows users and testers to provide almost immediate feedback, and for development teams to act on that feedback just as quickly.
  • Shorter testing cycles
    In traditional development, entire products’ worth of code would have to be tested together again and again, leading to lengthy, complex testing cycles. With smaller volumes of code introduced incrementally in a CI/CD pipeline, this is no longer an issue.
  • Improved development agility
    CI/CD pipelines make it possible for development teams to respond instantaneously to the needs of their organisation, and to pivot ongoing projects when necessary. With improved development responsiveness, companies gain the benefits of powerful, specialised software solutions exactly when they need them.

CI/CD is as much a cultural shift as a procedural one. As such, the specific steps in a CI/CD may vary from organisation to organisation. That said, they tend to follow a basic, uniform structure:

Plan

The first stage of the CI/CD pipeline includes all the background legwork that goes into conceptualising a new application. Project/product managers gather requirements from customers and stakeholders, build a project roadmap and create a backlog of necessary tasks. This stage also includes incorporating Agile management tools (such as Scrum and Kanban) into the ongoing process.
CI/CD pipeline

Develop

The development stage relies on simplified coding (a key principle of Agile) and fast feedback. Using continuous development principles, and including security early in the process, code is constantly validated to ensure its correctness.

Build

Continuing from development, the build stage relies on teams working in short iterations to create runnable instances of the product. Any issues that prevent a product from passing the build stage must be addressed immediately.

Test

This stage employs automated tests to ensure that the code is functioning as intended. The test phase should weed out any bugs from reaching the customer, and quickly produce developer feedback to help them isolate and remediate issues before they can grow into real problems. More mature CI/CD pipeline testing may extend into scanning for security vulnerabilities, something often referred to as DevSecOps.

Deploy

With test-validated code, the project can now be sent to a deploy environment. These are usually staging environments where the code may be subjected to additional manual testing and review, with approved changes automatically sent to production.

Operate

Once deployed and sent into production, the application is closely monitored to identify trends and potential problems. This is often integrated within the operational capabilities of the application and informs future updates.

In keeping with the continuous approach to development, many of these stages occur simultaneously, and code may cycle repeatedly through multiple stages as the application is refined and improved.

Because organisations have so much freedom in creating their own CI/CD pipelines, some may be more effective than others. Efficient pipelines share the following qualities:

Speed

The speed of the pipeline depends on a few factors: How long does it take to build a new pipeline? How long does it take to build, test and deploy an application? How quickly is feedback received? Is the pipeline able to scale effectively as needed? Speed depends heavily on streamlining processes, implementing effective automation and avoiding bottlenecks.

Reliability

A major advantage of automation is that it is predictable; given the same input, it should always produce the same output. Unreliable pipelines will often begin to demonstrate runtime oscillations and will break down when technology stacks change, or additional teams or projects are introduced.

Accuracy

The end goal of the CI/CD pipeline is to fully automate and visualise the software delivery process, from beginning to end, and to do so accurately. If it cannot do so, and if it relies heavily on manual tasks, then delivery times and costs naturally increase.

Although an effective CI/CD pipeline delivers a range of benefits, building one from scratch can be a difficult, complex process. In large organisations this can lead to consistency and visibility problems across teams that may have evolved different approaches. ServiceNow can help, by connecting the Now Platform to common Source Control and CI/CD solutions and providing insights based on other information already available in ServiceNow like service definitions and operational information. ServiceNow also supports the use of common source control and CI/CD solutions for applying DevOps practices to development of ServiceNow apps on the Now Platform.

Source Control and CI/CD provides the tools and functionality to ensure faster, at-scale app development. Use built-in integrations from ServiceNow to the tools that developers use most to effectively manage code changes across multiple developers and teams. Add powerful automation to governance processes to replace manual approvals of change requests and push projects through the CI/CD platform faster, and with fewer errors. Collect feedback earlier and more often and connect information across the pipeline, for faster application delivery that meets essential requirements. ServiceNow makes it all possible.

Give end users applications they can depend on, with Source Control and CI/CD value stream management solutions from ServiceNow.

Capabilities that expand with your business

Expand DevOps success across the enterprise. Take the risk out of going fast and minimise friction between IT operations and development.

Loading spinner
Contact
Demo