Phone

Contact sales: +1 (833) 441 7687

Salesforce DevOps - what is it, and why's everyone talking about it?

Simon Breslaw on April 24th 2020


This blog post gives you a sneak preview of the introductory chapter to our upcoming ebook on DevOps for Salesforce.

Ok, let's start with a definition. 'DevOps' is a set of practices that combines software development (Dev) and operations (Ops) to help teams build, test, and release software faster and more reliably. In slightly less abstract terms, DevOps is the coming together of the people responsible for building applications (developers and admins) with the people responsible for releasing, monitoring and maintaining those applications (typically admins, team leads or release managers). Working more closely with shared patterns, practices and tools, DevOps has the ultimate end goal of completely blurring the lines between these two distinct roles. This blog post gives you a short overview of what DevOps is, and how every team working within the Salesforce ecosystem can benefit.

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. Teams across the tech industry adopt DevOps because it helps them to deploy much more reliably and frequently. For example, a 2018 report by DevOps Research and Assessment (DORA) and Google Cloud found that high-performing teams use DevOps to release 46 times faster. Not only that, the same teams had 'change lead times' that were 2,555 times faster than those of low performers, plus much lower change failure rates and much faster incident recovery times. All in all, DevOps leads to shorter, more robust development and release cycles, which ultimately saves companies a huge amount of time and money.

From release management to Salesforce DevOps

As a cloud-based platform, Salesforce is designed to make it easy for you to add new capabilities and customizations to your orgs without worrying about things like infrastructure, networks, data storage and security. A lot of what would traditionally be considered the operations side is handled for you by Salesforce. For this reason, Salesforce admins and developers typically think about their process in terms of release management, with changes and new features deployed from sandboxes or added directly into production orgs.

But there's more to DevOps than managing infrastructure and releases. Over the last couple of years, Salesforce teams have been taking note of the trend set by development teams on other platforms, and have started to adopt ever more elements of DevOps best practice. They're automating parts of their process, taking an incremental and iterative approach to development, and using tools such as Git-based version control that are widely used within other software environments. In merging development and operations, they're also empowering admins and developers 🚀 by making it easy for everyone in the team to contribute to releases and spin up development environments. And at the same time, they're removing organizational silos that previously prevented a stream of ongoing good work flowing quickly to end users.

There are two main aspects to DevOps. Firstly, it's a philosophy, or a way of working, that empowers development teams to be more agile. It unites development and operations through automation to give teams the ability to manage their own releases rather than handing them over to an operations team. But in a more hands-on sense, it's also a set of tools to enable this philosophy - tools that let you replace fragile, manual processes with reliable, repeatable automated ones.

The benefits of DevOps

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 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, Google's industry survey for 2019 showed that high-performing teams deploy 208 times more frequently and make changes 106 times faster than low performers, with a 'change lead time' of less than one day at the high end. High performers also report change failure rates of 0-15%, compared with change failure rates of up to 60% among lower performers. What's more, elite performers are able to restore service in less than an hour when there are disruptions, whereas low performers reported restore times of between one week and one month.

At Gearset we're seeing similar trends among our users. Teams that make use of Gearset's continuous integration (CI) tools, for example, deploy 17 times more frequently than teams who deploy manually, and have a 90% success rate when releasing to production. In short, teams that have adopted DevOps practices dramatically outpace those that haven't.

17x more deployments!

Over the past year, 10 top-performing Salesforce teams used a subset of Gearset's DevOps features to make an awesome 6,424 deployments on average - or just under 18 deployments a day. More amazingly, an equivalent group of top ten teams added Gearset's CI automation tools into the mix to deploy a mind-blowing 106,945 times. That's 293 deployments a day!

Not only that, these stellar performers achieved a success rate of more than 90% for their final releases to production. DevOps is having a truly transformational effect on Salesforce teams. Just adding a few DevOps features gets you deploying more regularly than most other teams, while adding CI supercharges your whole release process. How often do you deploy?

No matter how far you've gone down the DevOps path, the right tools will let your team release more reliably and, as a result, much more frequently.

What does DevOps involve?

DevOps is about tools, processes and ways of working. Luckily, adopting DevOps for Salesforce doesn't necessarily mean you have to make lots of changes to the way your team works, or make large changes all at once. In fact, much of what the more advanced Salesforce teams are already doing falls under the label of DevOps. That said, Salesforce teams who are moving towards a more agile, faster and automated development process will incorporate the following four pillars of DevOps.

Pillar 1:
Version control for faster, more reliable development and collaboration

A Git-based version control system (VCS), or 'source control', is usually at the heart of any modern 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 using your metadata in Git as your source of truth for your org 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

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:

  • Reduce manual errors causing problems with releases
  • Reduce the risk of individual releases as your process becomes ever more reliable
  • Reduce downtime by safely 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 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 and flavors 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 breaking existing functionality by continually testing new and existing code
  • Make sure you're developing the precise features that your organization needs
  • 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. 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 backup solution will allow you to:

  • Use your deployment process to restore data and metadata
  • Deploy backup data to sandbox environments for testing
  • Monitor your org’s data for changes or deletions along with metadata monitoring
  • Mask and delete records to comply with data protection regulations

Putting it all together

Our ebook will go through all of the DevOps topics above in much greater detail - and should be coming out real soon! There's a lot more to say and learn about each topic, and teams don't adopt every DevOps practice over night; adopting DevOps is itself a gradual and incremental process of improvement. That said, DevOps starts with Git-based version control. So for those of you who are keen to learn as much as you can right now, there are a few resources we can share.

If you're not already familiar with Git, a good place to start is the Trailhead module on Git and GitHub Basics and this excellent resource for learning Git created by Atlassian. Once you've mastered the basic Git commands, you could start looking into Git-based workflows, incorporating your Salesforce development environments - sandboxes or scratch orgs - and online Git hosting providers, such as GitHub, Bitbucket and GitLab.

Source-driven DevOps with Gearset

Here we'd recommend our whitepaper on Version control for Salesforce and Atlassian's tutorial on Git workflows. You could then sample the second of our webinars on Git for Admins, which walks you through setting up a feature-branch model of developing with version control before showing you the basic uses of the Salesforce DX command line. You can also get a hands-on idea of how to integrate CI/CD into your process by checking out the Trailhead module on building an automated CI/CD pipeline with GitLab. Lastly, our short video on continuous integration for Salesforce shows you how easily you can incorporate CI from a UI with a Salesforce DevOps tool. Tools like Gearset can hide a lot of the complexity of DevOps, and make it really easy for you to adopt each of the DevOps practices in turn - as soon as your team is ready to take the next step.

Interested in Salesforce DevOps for your team?

If you have any questions on the above topics, we'd love to hear from you. Similarly, if you'd like to know more about how any of the above topics might benefit your team's process, get in touch. Just drop us an email at [email protected] or reach out to us right now via the live-chat on this page.

Ready to get started with Gearset?

Start free trial