Skip to main content

Salesforce Release Management And Version Control Branching Strategy Using Git

Release branching strategy is comprised of three unique words "Release" it means a go Live of your business requirement, second is "Branching" also known as salesforce version control using git which is not a salesforce terminology but these days we are using it in Salesforce DX, generally it refers to the Git version control tool and the branches (feature branch, developer branch, staging branch, preprod branch and master branch) that you create in a repository. In short, is used for versioning and history tracking for your changes that you have done via tools like Jenkins, Flosum, AutoRABIT, Copado, Gearset or any other IDE which is used to deploy your salesforce metadata components to Sandbox organization. The third-word "Strategy" which is a mixture of Release and branching. It means that how we can merge Salesforce release process with salesforce version control branching to deploy metadata components in salesforce environment in the best way with respect to the current model that we have adopted in our current project.

Summary of Salesforce Release and version control Branching Process In Salesforce

Release: The best/worst day that you pick to deploy your salesforce metadata components. Why worst !!!😤 because after deployment something can go wrong in production and you should be ready with your salesforce rollback strategy plan which you would have adopted within your project.

Branching: The salesforce business requirement OR the new feature that you build for the project and commit your changes to the respective branch which is assigned to the respective developer.

Strategy: How to adopt best SWOT Analysis Technique to deploy your components in production without any risk and failure and I have already discussed some of the strategies in my previous post. Even if the failure occurs what is the best rollback strategy plan for salesforce that you can adopt to minimize failures from occurring again and again.

After talking about basic definitions its time to focus on release branching and version control strategies in salesforce which I have used in past and also I would love to take your opinion, on how we can improve these strategies, so that it can help other release managers. I will be categorizing my strategies based on the deployment of metadata components in the Salesforce organization.

Weird But Effective Salesforce Release Management Branching Strategy

Deployment Strategy without change sets:

Deployment strategy without change sets is also known as the worst strategy. Let us consider the current situation in which most of us are using change sets to deploy metadata components from one organisation to another organisation.

Situation: Let us say SFDC247 have several salesforce org and we are using change sets to deploy salesforce metadata components and we have configured deployment settings, inbound and outbound changes in current project.

As you can see from the below diagram we have several salesforce orgs such as  DevOps_DevOrg, DevOps_QaOrg, DevOps_UATOrg, DevOps_PreProdOrg and Production.

Change Sets, Salesforce Org, Salesforce Developemt Editions
Fig1:Change Sets Design: Types Of Salesforce Org In SFDC247

change sets salesforce, Change sets, salesforce source control
Fig2:Change Sets Zig Zag Design For Salesforce Deployment  In SFDC247

Current Scenario Of Deployment: SFDC247 Developers deploy there changes from DevOps_DevOrg --> DevOps_QaOrg --> DevOps_UATOrg --> DevOps_PreProdOrg -->Production.

#Note: They can also deploy their changes to any other org based on the deployment settings that they have configured in their project. For example, a release manager can deploy its changes from DevOps_DevOrg --> Production (Please never do it 💣)

Limitations of this approach: Deploying salesforce changes from one org to another org without version control means that you don't have the track of the changes that were deployed to respective salesforce org. I am going to discuss in detail about change sets and its limitation in different posts.

Before talking about the second approach we need to talk about advanced level concepts of git such as git commit and git merge. I think you are feeling scared 😨 well you don't need to be, as we are not going to talk about these concepts but they are an important part of the strategy that we are going to discuss in the below article.

Stages Of Salesforce Metadata Deployments

It is very important to understand the stages of salesforce metadata deployments which are given in the below diagram. I am going to write a separate post regarding the stages of salesforce metadata deployment. As you can see from the below diagram we are using an IDE to commit our changes using git to our branch within a repository and if we have configured webHooks then it will be triggered based on the commit which has been done on the branch and from there it will trigger our CI Jobs like Jenkins/Circle CI and ultimately it will be deployed to your salesforce environment.

salesforce releases, salesforce release management, salesforce release manager best practicessalesforce release manager best practices
Fig3: Stages Of Salesforce Release Management Process

Below are the definitions of the technical terms which would be used in our strategy.
  • Git commit: Consider like you have developed one feature and changed one apex class then you can push your changes to the respective branch that has been allotted to you with respect to the salesforce org.
  • Git merge: To integrate changes from one branch to another branch. For eg dev branch can be merged with uat branch. Merging is a really important part of salesforce release management.
  • IDE: An environment which is used to commit your changes. Example of IDE is Visual Studio.
Once we have a good understanding of the above fundamentals we can go for our second strategy.

Strategy 2: Release Branching Strategy by using a version control tool known as Git.

To understand this strategy we have to think in terms of salesforce release application lifecycle management and salesforce release schedule that you follow in your project.

Situation: SFDC247 have several developers who are working on different features of a project, hence they need different sandboxes, which we have to refresh from production. So, SFDC247 release manager has refreshed four sandboxes and named as Devops_Dev1, Devops_Dev2, Devops_Dev3, Devops_Dev4 and similarly he has created Qa Sandboxes and named as Devops_Qa1, Devops_Qa2, Devops_Qa3, Devops_Qa4, UAT, PreProd and Production Environment.

#Note: Always follow a good salesforce naming convention so that it can help you to differentiate between salesforce environments.

salesforce releases, release management process, salesforce code repository, salesforce release management best practices
Fig4: Types Of Salesforce Org And Git Branches

Strategy Adopted: We also have git branches assigned to Development Orgs including UAT, PreProd and Production.

#Note: We should not assign any git branch to Qa Orgs with this approach.

Strategy Followed: Developers will commit there changes via IDE to there dev branches and release managers will merge (can use cherry-pick or rebase) an entire branch with staging. Similarly, release managers will merge changes to the pre-prod branch and then we can directly push our changes using CI-CD pipeline via Jenkins/Circle CI to our production org.

I have given you a detailed diagram of the git flow and salesforce 

salesforce continuous delivery, sdlc git, salesforce dx and git
Fig5: Salesforce SFDC247 Git Branch Flow
salesforce releases, salesforce deployment using git, salesforce and git, salesforce continuous delivery
Fig6: Salesforce Metadata  Release Management Process/Flow

But note that you have to make your master branch synchronized with production org.

Finally, You will be able to deploy your changes to production org and if any bug occurs, you have to raise a ticket in ALM tool by following salesforce sdlc process and then deploy that bug in a sequential flow as mentioned in the above salesforce release management process.

Things You Didn’t Know About Salesforce Release Management Process Which We have Not Discussed In Our Salesforce Release Management Strategy.

  1. If we don't have several developer salesforce environments in that case what is the best strategy--> feature branch strategy (I will discuss this later in another post)
  2. How we can ensure that merging is done perfectly by our release manager-->, To be frank, the best release manager knows how to do this, so you don't have to worry 😎
  3. You have not discussed hotfix or if any bug occurs what we have to do--> Good Question, I would always suggest you create a hotfix branch from the master branch and deploy changes immediately. But, as per my thinking this is not the best approach, I would create a bug in ALM Life cycle management and would ask developers to fix it in the lower environment and then follow the same process mentioned in strategy 2.
  4. What about rollback strategy--> I will write a post on this how we can achieve rollback with Jenkins but its quite complicated but achievable. Secondly, we also have the app exchange managed packages in the app exchange market like Flosum, Copado, AutoRabit or Gearset that can be used to rollback your metadata components.
  5. We would like to use post-deployment/pre-deployment steps and test automation techniques with the release branching strategy--> Answer would be Flosum, Copadao, AutoRabit etc.
  6. What about salesforce dx branching strategy--> I will discuss this in future posts.
Pic Credit: Image by Vitabello from Pixabay
In the upcoming articles, I am going to discuss a feature branching strategy and other related posts.

After reading this post about salesforce release management and version control strategy you would be having many questions and I would love to hear it from you and your team. Shoot any questions that you would like to discuss with me and we can find the best release branching strategy for your project.

You can always comment, contact me on LinkedIn and I will reply back you immediately :)

#Note: Publishing this content anywhere without consent of SFDC247 will result in lawsuit against copyright infringement


Popular posts from this blog

Flosum Vs AutoRabit Vs Copado : Best Salesforce DevOps Release Management Tool

Are you still using changesets or you have moved from changesets to salesforce ant migration tool? Salesforce has again introduced SFDX which supports the source of truth known as Git. Are you using SFDX or still planning to move ahead of salesforce DX to salesforce app exchange products. If yes, then you have come to the right place and I will introduce you to 3 major competitors of salesforce release management which gives you end to end salesforce release management solution to your needs. I have a lot of experience of working with each of these tools and I must say that each one of them is full of amazing features. So, today, I am not going to dig in detail about each product because it would require a lot of commitment to do it, but I would share my knowledge on why each one of them is unique in itself. Topics To Discuss On Also Read: Just

Top 5 Best Data Backup And Recovery Tools For Salesforce

Do you know salesforce will stop giving its premium service of Data Recovery in case of Data Loss from 31st July 2020? We came to know about its service when we logged a data recovery case with Salesforce support team and they told us that we can recover your lost data but it will take maximum duration of  6 weeks to 8 weeks. Then we came to know the recent announcement made by salesforce. In this article, I will focus my discussion on the Top 5 best data backup and recovery tools for Salesforce that we will have once this data recovery service will be retired by salesforce. Topics To Discuss On Salesforce Data Vs Metadata In order to understand this, article in detail, first, we need to understand the difference between Salesforce Data as well as Salesforce Metadata. Salesforce Data: It refers to the records stored in our standard and custom objects. All the records in salesforce are referred by a datatype known as ID. Data are like a spreadsheet where values are

Top 8 Salesforce Login Extension To Store Salesforce Org Credentials

Salesforce login extensions will store your multiple salesforce/ org credentials and allow you to log in quickly to your salesforce environment with one single click. It will authenticate your credential and open them in a default browser window. There are many salesforce login extensions which will save your time in storing those credentials and increase your productivity of work ☺. Why Developer/Release Manager/Business Analyst should use Salesforce login Extensions? Let us consider that I am a release manager and daily I have to log in around 10 different salesforce org and for all these orgs I have to memorize there login id and password. There are many occasions where I have to reset my password. Considering these issues/situations, I need a different approach to store all my credentials. Hence, I can choose salesforce login extensions and can open all these 10 orgs at the same point of time and with very minimal memory utilization of remembering salesf

A Guide To Salesforce Feature And Parallel Branching Strategy For Enterprise Customers

The version control and release management branching strategy of salesforce for an enterprise solution is quite complicated when it is compared to Changesets or VSTS with CI Tools. In the last article, we have discussed  salesforce git branching strategies which can be adopted in the current project of the salesforce. But Frankly speaking, even if you read my blog or any other blog the success rate of any salesforce branching strategy depends on the current branching model that you have adopted in your project.  In this article, we will discuss advanced branching strategy  for enterprise customers. Read My Previous Post:  The Roles And Responsibilities Of Release Manager / Code GateKeepers In Salesforce. The advanced branching strategy is also known as the feature branching strategy as well as parallel branching strategy . Feature branching strategy in combination with parallel branching strategy is being used by many enterprise clients. It is also considered as a successful b

Salesforce Managed vs UnManaged vs Package.xml - A complete Guide

Salesforce provides us with two types of the package in salesforce managed package and unmanaged package. A salesforce package is a list of metadata components which are tightly coupled with all the dependent components. We can use this salesforce package in many ways like deploying them from one Salesforce organization to another. We can also install these packages in our organization and assign them to users. Also Read:   What is Environment, Sandbox, Types Of Sandbox And How To Create Sandbox From Production Salesforce package is the list of metadata components tightly coupled with all the dependent components in the form of a box or container. There are two types of salesforce package Unmanaged Package and Managed Package . Salesforce package.xml contains the list of metadata components in an XML file format. We can retrieve and deploy metadata components using package.xml. Salesforce Topics Of Discussion So, please don’t get confused with salesforce pack

What Are Roles, Duties And Responsibilities Of Release Manager / Code GateKeepers In Salesforce

Salesforce as a whole is a very diverse company and there are many job openings in market if you are working in any salesforce domain whether it is Salesforce CPQ, Salesforce SaaS Platform, Salesforce, Pardot, Analytics, Einstein the list goes on and on.. But, In this article, we are going to primarily focus on the roles and responsibilities of that salesforce release manager or code gatekeepers should possess to perform activities related to deployment in Salesforce. A Good Release Manager Must And Should Be A Core Salesforce Developer, So that he can deploy quality code in production - Nitendra Shukla ( SFDC247.COM ) I know most of you will not agree with the statement that I have made above but it is my thinking that a good salesforce developer understands what is quality code and he will ensure that we are not deploying bad code in Production. Anyways this is not our topic of discussion today and we need to focus on the roles and responsibilities of a release manage

What is Environment, Sandbox, Types Of Sandbox And How To Create Sandbox From Production

Salesforce is known as the world's number one CRM and has been recognized by global leaders all over the world. Salesforce as a platform provides main support for SAAS and PAAS services. SAAS means software as a service and it provides salesforce services on rent based on per user/licence edition you purchase.  PAAS means platform as a service and you take as platform to customize your application but both these services needs salesforce environments so that developers can perform there metadata changes and write code with respect to there business requirement. Thus, In this article we will in discuss about S alesforce Environments . Contents Environment In Salesforce:  Environments in salesforce is an instance of the salesforce platform.It is also known as orgs or organization in salesforce. If someone is talking about orgs it means that he is talking about Environments in salesforce. There are many functionalities as well as features

An Ultimate List Of Top 200+ Salesforce Blogs On Web

An Ultimate List Of Top 200+ Salesforce Blogs On Web Salesforce Trailhead is the most loving and funny way to learn salesforce. It has many modules like salesforce apex, salesforce admin, salesforce development and many more. If you are the one who wants to learn salesforce then you must follow this trailhead link . But if you are the one who also learns salesforce from blogs then I have curated An Ultimate List Of 200+ Salesforce Blogs On Web Thus the second step to learn salesforce is by following bloggers, who are writing informative posts each and every day. These bloggers not only support overall salesforce community but also help users who are facing issues in salesforce lightning , salesforce admin or salesforce development . List of 200+ Salesforce Blogs Read Also: Hence, I have created an ultimate list of Top 200+ salesforce blogs in alphabetical order and this l

What Is SFDC247 And Why It Is Important To Understand Salesforce Release Management Process ?

Which is the best release management tool in salesforce? How code gatekeepers or release managers deploy the changes from one sandbox to another sandbox or in Production? What is the best release branching strategy we can adopt for our project in Salesforce? What are the roles and responsibilities of release managers? There are several such questions which we have in our project during our deployment life cycle phase and these questions must and should be discussed properly with salesforce architects or experienced core developers or release engineers. Salesforce SFDC247 Introduction Are You Having Issues When You Deploy Your Code Into Production? We try to follow the best practice approach proposed by Salesforce during the deployment of code from one sandbox to another or in production but still, we are having a lot of issues during merging of code from several developers. The functionality does not work in production as we are not doing proper testing during our deploy