As businesses rely more heavily on Salesforce, teams developing on the platform are faced with higher demand. Many Salesforce teams are turning to DevOps practices to meet business requirements, helping to deliver work quickly, efficiently and safely.
DevOps is growing in popularity in the Salesforce ecosystem, but for many teams it’s still a new concept. Read on for an overview of DevOps, and some guidance on how you can get started.
What is Salesforce DevOps?
‘DevOps’ is a set of practices designed to help teams build, test, and release software faster and more reliably. It stems from the need to combine the responsibilities of both software development teams (‘Dev’) and operations teams (‘Ops’).
For Salesforce, this means bringing together the people responsible for building applications (developers and admins) and the people responsible for releasing, monitoring and maintaining those applications (typically admins, team leads or release managers).
When the responsibility of releasing software is shared across the whole development team, there are fewer silos and the team can communicate and collaborate more effectively.
What’s the difference between DevOps and agile development?
DevOps is a new take on the development lifecycle and releases — it aims to make release cycles faster, more secure and less error-prone. This is partly achieved by incorporating the philosophy of agile development: releasing changes incrementally and regularly adding improvements, rather than releasing once at the end of a big project. DevOps also relies heavily on automation to shorten the release cycle and feedback loops, by replacing fragile manual processes with repeatable, reliable ones.
The benefits of DevOps
Although relatively new to Salesforce, DevOps has long been established as the best way of creating and managing software on other platforms and software stacks — so it isn’t some new and unproven invention, but an approach that has well-documented benefits.
The whole purpose of DevOps is to increase the ability of teams to deliver new features and solve critical issues quickly and with confidence. So it’s no surprise that high-performing teams who use DevOps best practices are also the ones that achieve:
- A higher frequency of new releases to production
- Shorter lead times for making changes and developing new features
- Fewer bugs and fewer service disruptions due to poor quality code
- Faster restore times in the event of service outages
In fact, the 2022 report from Google’s DevOps Research and Assessment program (DORA) found that elite teams release 973 times more frequently than low-performing teams. High-performing teams also have a lead time from commit to deploy that is a whopping 6570 time faster than low performers, and their changes are 1/3 less likely to fail.
And we’re seeing similar trends among teams developing on Salesforce. Our industry report shows that teams with the highest performance metrics all have a mature DevOps process in place. This allows them to release at least once a day, have a change failure rate of under 10%, and restore lost data within a few days.
The general benefits of DevOps apply across all software development but Salesforce DevOps has its own advantages that are specific to the unique characteristics of the powerful Salesforce platform. These include being able to automate releases, version controlling Salesforce metadata and increasing collaboration by utilising native tools like Salesforce DX. Some DevOps platforms, like Gearset, allow you to harness the power of SFDX, without the need for the Salesforce CLI.
Teams adopting Salesforce DevOps practices with Gearset have a 98% deployment success rate, and can release up to 12x faster than when they deployed with change sets. In short, teams that have adopted DevOps practices dramatically outpace those that haven’t.
What does Salesforce DevOps involve?
Luckily, adopting DevOps for Salesforce development doesn’t necessarily mean you have to make lots of changes all at once. Taking just one step towards a more agile development process can reap rewards. Your team might already be doing some things that are part of DevOps!
In general, a robust DevOps strategy will include practices such as version control, continuous integration, automated testing and backup.
Pillar 1: Version control for faster, more reliable development and collaboration
A Git-based version control system (VCS), or ‘source control’, is at the heart of any modern Salesforce DevOps process. Source control allows your team to track all the changes you make and easily review your contributions, while making it possible for multiple contributors to work on the same features at the same time. Individual developers contribute new work within Git branches, which are later merged into the master branch — containing the latest and stable version of the project — once the work has been reviewed.
There are countless reasons and benefits to using a version control system like Git. Among many other things, it helps you:
- Reduce risk and avoid costly mistakes by making Git the source of truth for your development team instead of your production org
- Track and annotate your development work with a complete history of every change your team makes to your org — to help your auditing and debugging
- Collaborate with multiple team members working in the same org without overwriting each other’s work or treading on each other’s toes
- Release reliably and safely by testing your changes first until you’re satisfied they’re fit for purpose
Find out more about Git in our whitepaper on version control for Salesforce. version control for Salesforce.
Pillar 2: CI/CD for rapid, continual added value without manual repetition
Continuous integration (CI) often builds on a Git-based workflow and automates the process of testing and validating changes, making sure they can be deployed. Continuous delivery (CD) is about releasing frequent, small changes to users via an automated process and reducing the risks associated with big releases.
Taken together, CI/CD takes the pain and risk out of repeatedly deploying changes manually to multiple development environments and on to production. It promotes an iterative and incremental approach to development, where you aim to contribute frequent small changes and get immediate feedback from your team and end users. Using CI/CD to make regular, small and automated releases helps you:
- Avoid manual errors causing problems with releases
- Reduce the risk of individual releases as your process becomes ever more reliable
- Reduce downtime by quickly rolling back mistakes and unwanted changes
- Tighten the feedback loop and allow your users to drive your development process
- Work on multiple projects simultaneously and change direction in response to feedback without losing the existing work
- Release the value you’ve created to your users as fast as possible
Pillar 3: Automated testing for bug-free, clean code that you can rely on
Testing is an integral part of software development, and Salesforce makes developers test at least 75% of any new code they deploy to a production org. But the tests that you write need to be useful and meaningful tests if you want to make sure your team can easily review and reliably build on your code in future.
Automation can help you by testing changes every time they are merged into your master branch and/or deployed to another environment. An agile DevOps setup will also let you populate development or testing environments with data from production, so you can check your code works with actual data — real data that will come in all sorts of shapes that you might not have thought about when you started writing your code. Automated testing allows you to:
- Save time and effort by making sure your changes work properly and can be deployed
- Avoid shipping faulty code and causing existing functionality to break
- Make sure you’re developing the precise features that your organization needs with user acceptance testing
- Improve the quality of your development work by reducing bugs and critical issues, freeing up your team to work on those great new features
Pillar 4: Backup for swift and complete disaster recovery
A backup of your customer and organization’s data is essential in case a disaster strikes — whether it’s accidental data loss, data corruption due to a third-party integration, malicious actions of disgruntled employees, or even a Salesforce platform outage.
But a backup solution is only as good as your ability to restore from it. Backups and org security is fundamental to DevOps, as it ensures the business can quickly resume normal operations.
Key here is the relationship between your data and the structure of your org — the metadata in which your data is stored. You need continual backups of both your data and metadata. Teams that have tools and processes in place to monitor and roll back changes to their data and metadata are then also in a position to restore complex data hierarchies to their orgs quickly before too much damage is done. In short, a smart Salesforce backup solution will allow you to:
- Monitor your org’s data for changes or deletions along with metadata monitoring
- Use your familiar deployment process to restore data and metadata
- Deploy backup data to sandbox environments for testing
- Mask and delete records to comply with data protection regulations
For a detailed guide to backing up and restoring your Salesforce org, read our free backup ebook.
Want to learn more about Salesforce DevOps?
DevOps Launchpad is a free training platform for anyone wanting to develop their knowledge and supercharge the skills needed for Salesforce DevOps. You’ll even get the chance to showcase your expertise by sharing your certifications and badges with your peers and colleagues. So, whether you’re completely new to DevOps, or you have years of experience, DevOps Launchpad can help you in all areas, from version control to backup. Level up today!
Where to start with Salesforce DevOps tools
It’s best to adopt DevOps processes gradually and improve incrementally, rather than trying to do everything at once. Moving away from change sets and adopting version control are the first steps you can take to improve your release process. Implementing backup early also guarantees the safety of your org while you begin making other changes to your workflow.
There are a number of different tools that can help you on your way to DevOps success:
Deployment tools help you to move data and metadata between environments. Some tools will cross-reference the source and target to help the deployment succeed.
Monitoring tools will keep an eye on how your orgs are running once you make a release. They’ll flag any errors or unexpected changes and some tools will give you the chance to roll back changes.
Version control tools, like GitHub or GitLab, integrate with your chosen deployment tool to track changes in your orgs and allow the whole team to see what’s changed, when and how.
CI/CD tools help to automate your testing and your Salesforce deployments. By streamlining your process and adding automation, you’re more efficient and able to deliver to the end user quickly.
Backup tools secure your data and metadata, making it easier to locate and restore if you were to suffer a disaster. Going a step further and automating your backups to run daily puts you in the best position to recover when something goes wrong.
Automated tools for testing will speed up the code review process and catch errors and bugs in developer sandboxes — long before they reach your production environment.
Gearset can remove a lot of the complexity of DevOps, and makes it really easy for you to adopt each of the DevOps practices one at a time — as soon as your team is ready to take the next step.
Launch your DevOps journey today!
You can find out how advanced your practices are and benchmark your current performance against other teams by taking our free maturity assessment.
Some teams think that maturing from change sets to Salesforce DevOps Center is a quick fix to start practising DevOps, but as you can’t create a fully automated pipeline or integrate backups, it isn’t possible to reach maturity.
If you’re looking for a full Salesforce DevOps platform that can handle all of the DevOps processes listed above, while integrating with your existing version control system, then sign up for your free 30-day trial of Gearset and start your DevOps journey today.