CI/CD for Salesforce that just works out of the box

Eliza Pepper on

Share with

LinkedIn
Twitter

CI/CD is a real game-changer for the Salesforce ecosystem. In fact, it’s at the heart of DevOps, encouraging more reliable development and faster release cycles.

While most of the Salesforce ecosystem agrees that investing in CI/CD is worthwhile, many teams struggle when looking for the right CI/CD solution. Some opt for generic automation tooling, whole others search for something that’s tailored to the Salesforce platform. With so many conflicting opinions and solutions available, how do you weigh up which is the best choice for automating your Salesforce pipeline?

Representation of the ease of setting up Salesforce CI/CD automation with Gearset.

What’s CI/CD?

First, let’s brush up on some definitions. Continuous integration, the CI part of ‘CI/CD’, is about regularly getting completed work into a pipeline for automated testing and validation. Continuous delivery, the CD part, is an overarching aim to deliver to end users more frequently, which can be achieved by automating the flow of work through your release pipeline. It slightly complicates things that some teams also use CD to refer to continuous deployment, which specifically refers to automating the final release to production. This can be risky and isn’t common practice.

Altogether, CI/CD encourages regular releases of incremental improvements, which helps you get new features into the hands of your users quickly. There are many benefits to CI/CD, including:

  • Fewer bugs in production due to smaller, less risky releases
  • More reliable and frequently tested release processes
  • Safer options for rolling back mistakes, and less downtime as a result
  • Tighter feedback loops within an agile, user-driven development cycle
  • Better ability to run multiple projects at the same time
  • Faster delivery of added value to end users

When choosing your CI/CD solution, it’s worth weighing up all the options and choosing the tool that’s best placed to help your team realize these benefits for your business.

How to prepare for CI/CD adoption

To get all the benefits of CI/CD, you need to build on strong foundations, so it’s critical to make sure your team is at a sufficient level of DevOps maturity before you begin. There are two questions you should ask yourself when assessing this:

Implementing CI/CD before you can answer ‘yes!’ to both of these questions not only jeopardizes the speed and reliability of your deployments, the experience might dent your team’s willingness to embrace future attempts to improve your DevOps process.

What types of CI/CD solution are available?

When choosing a CI/CD solution, Salesforce teams have two main options: standard cross-platform tools or Salesforce-specific DevOps solutions.

Standard CI/CD tools

Salesforce teams can use standard tools that are used widely across all software stacks — not just on the Salesforce platform. If a business already has a CI/CD pipeline for another platform, it can be a natural choice for the Salesforce team to first try putting together a toolchain for Salesforce made up of the same software.

There are standard pipeline tools, built into version control, such as Azure DevOps, Bitbucket Pipelines, GitHub Actions and GitLab CI/CD. There are also cross-platform automation tools like Jenkins, CircleCI, TeamCity, Bamboo and Travis CI. These are all do-it-yourself pipelines that you’ll need to customize for your Salesforce release process, using SFDX and the Salesforce CLI.

Standard automation tools can also be used to orchestrate UX or Lightning Web Components testing, by integrating services like Selenium or Jest.

However, there are various drawbacks to using cross-platform CI/CD tools for your Salesforce release cycle. Broadly, they fall into three categories:

1. A lengthy setup process

Setting up and configuring a CI/CD toolchain requires DevOps expertise and can take a long time. Salesforce teams switching to Gearset tell us they invested around 90 hours in the initial setup of a self-built pipeline — and that’s just putting the basic CI/CD workflow in place! Even more time is needed to set up static code analysis, project or issue tracking, deployment scheduling and notification integrations.

2. Costly upkeep and maintenance

Typically, the time it takes to adopt these tools can cost thousands of dollars — and the setup costs are just the beginning. There are plenty of maintenance costs associated with managing scripts, automation tools, servers and authentication methods. Teams sink a lot of time tweaking their process whenever they need to add new environments, roll back a release, or reconfigure deployment scripts based on a particular set of metadata.

3. Brittle automation

Salesforce is a unique platform, and deploying via the Metadata API isn’t always plain sailing with generic tooling. In fact, 80% of Salesforce teams say they regularly see CI builds fail, meaning they need to unblock their automation manually. All of this means time spent on managing the process rather than on building and shipping features to end users — the ‘continuous delivery’ goal of CI/CD.

An all-in-one Salesforce DevOps platform

The alternative to these standard do-it-yourself tools is to use a CI/CD solution built to handle all the complexities of your Salesforce deployments. Gearset offers a complete DevOps platform with all the functionality you need for an efficient and robust release pipeline. There are several key benefits that set Gearset apart:

1. Easy to set up

The first thing you’ll notice with Gearset is just how easy it is to get started. What can take 90 hours to build with generic tools takes just 30 minutes in Gearset. Configuring a CI job is as easy as navigating through the intuitive UI, where you can select metadata filters, specify tests, integrate notifications, and add any outgoing webhooks.

You won’t need to build, manage or maintain a stack of different testing processes — Gearset provides that for you. And you can easily change or modify your team’s workflow without getting bogged down in build agents, deployment scripts, or SFDX commands. This is particularly helpful if you have members who are still building up their technical knowledge.

CI/CD screenshot: editing a CI job in Gearset

2. Reliable and successful deployments

Gearset’s intelligent deployment engine understands your metadata and makes sure your deployments succeed first time. It will automatically spot and resolve common deployment issues, such as missing dependencies, to make sure your deployments run smoothly. You also get a full history of all the changes made by your team, with automatically generated deployment reports for every run of your CI jobs. With just a few clicks you can roll back or clone a previous deployment to a new environment.

Teams using Gearset have a deployment success rate of over 90% — which compares with roughly 50% for deployments using native tools on Salesforce. When switching from standard CI/CD tools to Gearset, our customers have reported dramatic reductions in the time taken for each release. In other words, you’re saving time on each deployment, plus your deployments are much more likely to succeed. These time savings soon add up to substantial sums saved each month.

3. Integration with your VCS

Gearset integrates with all the main Git-hosting providers, so you can stick with your preferred VCS. Deploying between any Salesforce org and source control system is easy, and you can create a CI/CD process that meets your needs. While we’re always happy to advise on the right Git branching strategy, Gearset is a flexible platform that will work with your unique process. Here’s just one example of how a relatively basic CI/CD workflow might look:

Diagram demonstrating a CI/CD workflow for Salesforce

4. Visualize your whole workflow with pipelines

With Gearset, you can visualize and manage your entire release process using pipelines. You’ll see a complete bird’s eye view of your CI/CD process and be able to easily deploy your changes up or down stream. This clear and concise visualization means all team members can see the workflow without feeling overwhelmed.

Pipelines seamlessly integrates with your Git hosting provider, so any changes made in your VCS will be shown in pipelines and vice versa. Merging changes automatically opens pull requests for forward or back promotion to other environments, which makes it even easier to track and push changes through your pipeine — all within the app. And Gearset even handles merge conflicts for you that Git can’t resolve.

Gearset pipelines screenshot: CI/CD for Salesforce in action

5. A complete DevOps platform

Gearset offers you a complete DevOps platform under one roof. With solutions for intuitive metadata deployments, powerful automation, data deployments and integrated backups, your team can manage and protect all of your Salesforce data and metadata within the same UI.

When you compare this functionality with that of standard tools, Gearset stands apart from generic CI/CD tools — which is why global enterprises choose Gearset over a DIY approach with open-source tooling.

A table showing Gearset vs common CI/CD tools

Choose the right CI/CD solution for your Salesforce team

Successfully adopting CI/CD is integral to DevOps success and unlocks the benefits of agile working, so it’s important to find the solution that’s right for your team. Get in touch to talk through your DevOps process or, to see how Gearset can help you implement CI/CD with your own orgs, sign up for a free 30-day trial. It really does work out of the box!

Ready to get started with Gearset?