CI/CD Tools: How to Choose Yours Wisely
Published: 2020-02-25 14:56:58

Continous integration (CI) and continuous deployment (CD) tools allow teams to merge, build, test, and deploy code branches automatically. Implementing them along with conventions like "commit frequently" forces developers to test their code when it's combined with other people's work. Results include shorter development cycles and better visibility of code evolution among different teams.

<img class="wp-image-872 alignright" src="https://library.scalyr.com/2018/07/19175508/Continuous_Integration.png" alt="" width="279" height="271">

Once you commit to using CI/CD in your software development cycle, you're immediately faced with a galore of options: Travis, Jenkins, GitLab, CodeShip, TeamCity, and CircleCI, among others. Their names are catchy, but they hardly describe what the tools do. So here's a roadmap for choosing the right tool for your needs.

<!--more-->
<h2>What Platforms&nbsp;and Integrations Should It Support?</h2>
Whether you're part of an enterprise or a startup, you'll first need to figure out all your platform requirements. Think about your operating systems and their versions, programming languages,&nbsp;access to third-party APIs, libraries, frameworks, and testing suites; collect all these data and check that each tool is able to support them all. You don't want painful troubleshooting sessions or loss of commercial provider support because of a version mismatch.

There are some shortcuts that I can provide:
<ul>
 	<li><strong>BuildBot&nbsp;</strong>is a popular choice among Pythonistas. It's also written in Python, and it's very flexible. FOSS projects like Mozilla Firefox and MariaDB currently use <strong>BuildBot&nbsp;</strong>for their multi-platform builds and testing.</li>
 	<li>People using JIRA or Bitbucket will find that&nbsp;<strong>Bamboo</strong> and <strong>Bitbucket pipelines</strong>&nbsp;fit their ecosystem. But beware of price increases as your number of environments and need for parallelization grow.</li>
 	<li><strong>Jenkins'</strong>&nbsp;impressive list of plugins offers compatibility with every major developer tool in the market. Java shops will probably be comfortable deploying Jenkins because it's written in that language.</li>
 	<li>If you're building .NET projects to run on a Microsoft stack, you'll find two natural choices: <strong>Visual Studio Team Services (VSTS)&nbsp;</strong>and <strong>TeamCity. </strong>Both include Docker support.</li>
</ul>
<h2>Where Will It Run and Who Will Maintain It?</h2>
Some enterprises have regulations to meet, so they can't put their codebases in cloud services. Startups lack the manpower and time to run their own tools. Teams in both groups might be wary of security breaches caused by a wrong decision when using publicly available services. Whichever is your position, here's a set of tips to navigate the cloud vs. on-premises conundrum:
<ul>
 	<li>Cloud services ease the workload for our teams—but always at the expense of fees above certain usage.</li>
 	<li>Extra charges from&nbsp;CI/CD cloud services come in the form of higher concurrency, build events, build time, and/or user count.</li>
 	<li>Some cloud services have a zero-cost plan for small teams. You could test the waters using that in a greenfield project.</li>
 	<li>On-premises options like GitLab, Travis-CI, and TeamCity have hosted offerings that let you test before committing to run your own copy.</li>
 	<li>On-premises tools require resources ready to orchestrate your builds and tests. That means more complex tasks to run, troubleshoot, and maintain.</li>
 	<li>Teams should be aware of legal and business requirements when uploading code and data to cloud services.</li>
</ul>
<h2>Who Will Use It and How Often?</h2>
It's only a matter of time before the results of using CI/CD become visible to management. At that point, your organization will be increasingly dependent on CI/CD. User adoption and build frequency will increase. Take a look at these items before deciding your team's headcount and licensing requirements:
<ul>
 	<li>Provide some managers read access to your CI/CD. Giving them visibility improves the chances of them supporting these efforts.</li>
 	<li>Choose a tool that integrates with your organization's favorite authorization method. Nobody wants one more password.</li>
 	<li>Get a list of desired environments and take note of how often your teams would hypothetically push code to them.</li>
 	<li>Recalculate your usage when you add a new team or user. Don't let your bills get out of control.</li>
</ul>
<h2>What Are Our Estimated Costs?</h2>
Depending on the nature of your company and team, you'll either prefer an operating expense or a capital expenditure. I'm an advocate of pay-as-you-go services, personally. They allow you to keep costs down when you're starting, and they remove complexity. But as soon as your SaaS yearly bills reach what you'd pay an engineer, you might want to get some of those toolsets under your control or migrate to other providers with lower costs. Here are some gotchas when estimating costs:
<ul>
 	<li><strong>TeamCity</strong> and <strong>Bamboo&nbsp;</strong>require extra payment when you need more than one remote agent, so each additional environment costs more.</li>
 	<li><strong>VSTS </strong>is free for teams of five people or less. After that, you pay per additional user each month.</li>
 	<li><strong>GitLab&nbsp;</strong>only supports multiple active directory sources in its enterprise edition. <strong>Jenkins</strong>, on the other hand, supports it through a plugin.</li>
 	<li>Some SaaSs charge per build time. If this is the case with your chosen option, configure your pipelines to use prebuilt images with resolved dependencies.</li>
 	<li><strong>Jenkins, GoCD, BuildBot, </strong>and <strong>GitLab-CE&nbsp;</strong>have OSI-compliant licenses while <strong>Bamboo</strong>, <strong>TeamCity</strong>, <strong>Travis-CI Enterprise,&nbsp;</strong>and <strong>GitLab-E</strong><strong>E </strong>are commercially available. Some of them charge based on the number of users, remote agents, and features.<strong>
</strong></li>
</ul>
<h2>Availability of Documentation, Training, and Support</h2>
It might not be evident now, but you'll end up deploying to production with this new tool. So you'll want to set up the same kind of expectations you currently have for all your other tooling in production because, at some point, you will probably
<ul>
 	<li>need training for more than your vanguard CI/CD team.</li>
 	<li>troubleshoot problems that affect your availability to internal and external customers.</li>
 	<li>extend your implementation to more environments, additional third-party integrations, and new business needs.</li>
 	<li>require emergency support beyond what a user community may offer.</li>
 	<li>provide onboarding documentation to new team members.</li>
</ul>
<h2>Metrics and Vendor Lock-In</h2>
I decided to leave these two strategic factors as final arguments—not for their lack of importance, but because they're only important once you've successfully adopted a CI/CD tool. While it's great to implement a delivery pipeline, it's hard to see improvements over time if you're not measuring and comparing to a baseline.<img class=" wp-image-2649 alignright" src="https://library.scalyr.com/2018/05/31002225/Odds-are-that-youll-probably-change-tools-when-your-requirements-evolve..png" alt="" width="276" height="276">

Here's a set of questions that will help you know what's relevant to measure in your line of business:
<ul>
 	<li>What's your business focus? Is it maintaining a reliable platform? Is it increasing your user base? Or is it adding software features ASAP?</li>
 	<li>Does your team deploy software to production and let it fail as part of debugging?</li>
 	<li>How many bad builds are slipping through and failing in production?</li>
 	<li>What is your mean time to recover from a failure in production?</li>
 	<li>How does your delivery pipeline design affect a push to production during an outage incident?</li>
</ul>
Now, regarding the vendor lock-in factor, the CI/CD ecosystem is blooming. Odds are that you'll probably change tools when your requirements evolve. Or perhaps your SaaS provider goes out of business. Don't forget to consider how much effort it would take your team to migrate your delivery pipeline to a different tool or provider in case a change is necessary. Here's some food for thought:
<ul>
 	<li>Can you export workflows and configurations?</li>
 	<li>Do exports come in formats that might be automatically transformed as inputs for other tools?</li>
 	<li>How tightly integrated is your CI/CD tool to specific computing resources?</li>
</ul>
<h2>Take the Next Step</h2>
If your current software development cycle is made of stages where people step on each others' toes while trying to survive the minefield created by libraries, APIs, and interservice dependencies, perhaps it's time to choose a CI/CD tool and start optimizing your software delivery pipeline.

Have you experienced this process already? Share your tips with us in the comments section!