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, while 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?
Understanding CI/CD terminology
When talking about CI/CD, there are some very similar terms used – which can get quite confusing! So first, let’s brush up on some definitions.
What’s continuous integration?
Continuous integration, the CI part of CI/CD, is the practice of frequently merging development work back into the main branch of Git, your version control system (VCS). Merging early and often confirms that your work can be successfully integrated with the rest of your code. The longer you hang on to development work in an org or Git branch, the more likely you’ll hit a conflict when you try merging into main. Choosing the right continuous integration tool can make or break your release pipeline.
What’s continuous delivery?
Continuous delivery, the CD part of CI/CD, is the 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. There can be some confusion over the difference between continuous delivery vs continuous development.
What’s continuous development?
Some people use the term ‘continuous development’ to mean much the same thing as ‘continuous delivery’. These are both umbrella terms for the whole automation process, encapsulating everything from continuous integration to continuous testing. The terms can be used interchangeably, but we prefer ‘continuous delivery’ because it’s more focused on the value of CI/CD to end users.
What’s continuous deployment?
Sometimes ‘CD’ is used to mean continuous deployment instead of continuous delivery. Continuous deployment means automating the final release to production, so everything that passes your automated tests is also released automatically. This approach requires complete confidence in your tests and testing processes.
Altogether, CI/CD encourages these processes to drive 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
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:
- Are your deployments repeatable and reliable?
- Are you already using version control as the source of truth for your development?
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 CI process.
Challenges of CI/CD
There are a number of challenges that teams may face when implementing CI/CD into their processes.
- Difficulty learning new technical concepts as a team. To be successful, CI/CD needs the backing of the whole team. As this will be a whole new way of working, educating admins and developers on version control and CI/CD is vital for successful DevOps adoption.
- Convincing the wider business of the value. In the early stages, it can be a challenge to convince the business that it’s a priority to invest in DevOps. Showing that work can be delivered sooner along a more reliable release pipeline helps to demonstrate the value of CI/CD.
- Stalled CI jobs can cause headaches. It can be deflating to have to manually intervene when your automation jobs are constantly failing. Once they’re reliable, the headaches will ease, but it can take patience to get to this point.
What types of CI/CD solution are available?
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. There are a number of continuous integration challenges that teams can face along the way, but the right setup should address these issues right from the beginning. Salesforce teams have two main options when choosing a CI/CD tool: 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.
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 Salesforce CI/CD pipeline 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’s CI solution 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.
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:
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.
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.
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!
If you’re looking for an in-depth guide to setting up a CI/CD pipeline, addressing all the key questions about release automation, then download our free CI/CD for Salesforce ebook.