Deploy differences between git branches

ClickDeploy Team
3 min readDec 9, 2018

--

Salesforce release management and DevOps process can be very different from organizations to organizations. The process is largely driven by a number of factors including team sizes, skill sets, release frequency as well as the amount of customization in the orgs.

At ClickDeploy, we work with hundreds of teams who leverage git for their Salesforce releases. While these teams are using ClickDeploy in slightly different ways, there are two major approaches describing how teams deploy from Git. Some deploy the entire git branches to production (or UAT), others deploy just the differences between a release branch and master. In this blog, we will explore the latter approach and how it is done using ClickDeploy.io.

Process

In the diagram above:

  • A release branch (sprint_8) is created off master at the start of the sprint
  • Using ClickDeploy Declarative Git Flow, developers & admins commit changes to feature branches and submit pull requests targeting sprint_8 release branch.
  • At the end of sprint_8, deploy all files changed (committed) since sprint_8 release branch. Upon successful deployment, merge sprint_8 to master.

Deploy differences between branches using ClickDeploy

To deploy differences between branches, simply create a new deployment as below:

After you save the deployment, go to Deploy Options > Advanced Options > Select deploy differences between branches.

After the deploy options is saved, you can review the exact files changed between the two branches and view line-by-line differences via Component Selected > Review Diff

You can also download the deployment package for review before proceed using More > Download Deployment Package. Once you are ready, click validate or deploy to kick off the deployment.

Setup CI job to validate the release branch

To maximize the chance of a successful deployment at the end of the sprint, you would want to ensure that your release branch is validated at every feature branch merge. Setting up CI job to validate release branches is easy using ClickDeploy. Simply create a new CI job, select “Trigger by commit to branch”. After save, go to Deploy Options and follow the similar configuration steps as above. You can decide to validate the entire branch or just the differences in your release branch compared against master.

Summary

Salesforce release process can vary depending on the level of DevOps maturity among teams. For orgs with less customizations and shorter deployment time, it is often a better practice to deploy the entire git branch. This helps to enforce git being the source of truth as well as minimize deployment dependency errors in the long run. However, for larger orgs with longer deployment time, having the option to deploy or validate just the differences between branches can be a significant time saver in many occasions.

At ClickDeploy, we aim to equip teams with elegant and easy to use tools so that you can assemble your release process in a way that works best for your team.

Are you ready to explore how ClickDeploy can help you streamline your release processes to deliver faster and more frequent deployments to your customers? Use your Salesforce login to sign up for a three-week trial. ClickDeploy is secure and 100% cloud-based, so you can try it out for free without installing anything on your Salesforce org.

--

--

Responses (1)