Sign up for the KDAB Newsletter
Stay on top of the latest news, publications, events and more.
Go to Sign-up
Jan Marker
11 September 2024
Adopting proven practices like continuous integration (CI) and continuous deployment (CD) is a key part of modern software design. These methodologies enhance software quality and team productivity while shortening development cycles – what’s not to love? Arguably, it’s the short-term pain of getting these systems installed and configured for your environment and the long-term pain of maintaining them. But you’ve come to the right place; this blog gives you some practical tips in getting your CI/CD system spun up that avoid common pitfalls and maximize long-term benefits.
Not sure you want to take the plunge? Here’s why we recommend CI/CD practices.
CI/CD practices have several advantages that that can transform your development process. Here are some key reasons why implementing them is a smart move:
A successful CI/CD pipeline requires several key components to function smoothly. These elements work together to ensure that your development process is efficient, scalable, and reliable. Here are a few basic requirements to get started:
Deciding whether to host your CI/CD system in the cloud or on-premises is an important decision that impacts cost, scalability, and security. Each option has its advantages and disadvantages, depending on your specific needs and constraints. Here are some key considerations to help guide your choice:
Cloud pros
Cloud cons
On-prem pros
On-prem cons
CI is only effective when developers use it. And if your CI system is too slow to deliver results, developers will tend to ignore it. How do you achieve a balance of speed and thoroughness?
Essentially, you want to implement two main CI builds – one that allows a quick per-commit build and one that builds nightly. The quick build is run throughout the day as developers make commits and it should use pre-built dependencies and caches for optimal speed. The nightly build executes a full build from scratch every night with all static checks and installers.
If developers are in the same time zone, the two builds can be run on the same machine – otherwise, you’ll want a dedicated machine for nightly builds. You may also consider a third CI build for packaging. This can be used for teams that share external updates, such as customer testing or third-party validation services. This build is somewhere between the quick and nightly builds – it can rely on bits of the quick build (including packaging if it’s fast enough), while benefitting from the deeper coverage of the nightly build.
In a CI workflow, using developer tools like GitHub, Gerrit, and Bitbucket, CI-gated check-ins are essential. These tools ensure that all changes are validated by the CI system, confirming that commits pass necessary compiler and unit tests before merging into the main branch. Making CI gating optional can lead to the dangerous practice of skipping or bypassing CI builds, which significantly reducing a system's value.
That’s why your CI system needs to be rock solid. If it frequently experiences issues – like excessive build times due to network problems – developers might be tempted to bypass CI checks altogether. Continuous maintenance is essential to ensure CI systems function effectively as a non-negotiable part of the development workflow.
This short blog just scratches the surface on CI/CD. If you’re looking for more information and details on some of the most commonly used CI/CD tools – and when you might be better off choosing one over the other – check out our CI/CD best practice guide.
About KDAB
The KDAB Group is a globally recognized provider for software consulting, development and training, specializing in embedded devices and complex cross-platform desktop applications. In addition to being leading experts in Qt, C++ and 3D technologies for over two decades, KDAB provides deep expertise across the stack, including Linux, Rust and modern UI frameworks. With 100+ employees from 20 countries and offices in Sweden, Germany, USA, France and UK, we serve clients around the world.