Deployment · Salesforce

Salesforce CI/CD: Introduction to Gearset

What is CI/CD?

Continuous Integration or Continuous Delivery is the idea of automating deployments so that that you can continuously integrate and deliver small changes rather than doing massive releases.     

CI means setting up an automated process that allows developers or admins to push their changes in real time. The technical goal of CI is to establish a consistent and automated way to build, package, and test applications.    

Most teams work with multiple environments other than the production, such as development and testing environments, and CD ensures there is an automated way to push code changes to them.

Typically, this involves using a source control solution (Git, SVN, etc.) and a CI server (e.g. Jenkins, Travis, etc.). Test automation is also a key component of CI. When you want to submit a change, automated tests run so you know whether it’s safe to deploy or not and if they pass you automatically deploy your changes to the target environment.

Major Deployment options in salesforce:

1) Changesets 

2) Ant migration tool 

Changesets:

Changesets is one of the tools provided by Salesforce for migrating metadata changes between connected orgs. It provides a process to synchronize the metadata between a source org and a target org.

Challenges of changesets:

  1. Destructive changes aren’t supported
  2. Can’t use the same Changesets across your delivery chain
  3. Changesets are available only in connected orgs 
  4. Can’t schedule the deployments 
  5. No support for version or source control 
  6. Do not support all types of metadata components
  7. No governance across the delivery chain

Ant Migration Tool: 

The Ant migration tool is a free tool provided by Salesforce. It is a Java/Ant based command line utility for moving metadata between a local folder and an org. It’s also known as the Force.com migration tool.

Challenges of Ant:

  1. Running deployments with Ant requires manual editing of metadata which is error-prone and time consuming.
  2. Dependencies for the deployment package must be individually identified and incorporated, requiring a deep knowledge of Salesforce.
  3. Since it lacks a GUI, the Ant tool has a steeper learning curve than changesets. This lack of interface is a barrier to many non-developers and means many admins and teams are unable to use it at all.

What is gearset and how it is better than changesets and Ant?

Gearset is the modern DevOps tool for Salesforce. It helps teams to compare, move, and track changes between Salesforce environments faster and more easily than ever before.

Gearset was specifically designed to replace changesets and provide admins with a more powerful, yet easy-to-use tool to manage their releases.

Features of gearset which are an advantage over changesets/Ant:

  1. Custom Comparison filters
  2. Reusable Custom metadata filters
  3. Advanced dependency analysis
  4. Version control
  5. Complete deployment history
  6. Deployment Rollback
  7. Automated change monitoring
  8. Automated unit testing
  9. Continuous Integration
  10. Team collaboration
  11. Custom Notifications
  12. Jira Integration
  13. Data deployments

Release management with gearset: 

release cycle

Let’s see how we can setup Gearset account and managing salesforce & source control connections:

Setup Gearset Account:

  • Log in using one of your existing Salesforce, Google, or LinkedIn accounts

create account

  • Click “Allow” when prompted by Salesforce, Google, or LinkedIn
  • Complete your Gearset profile by naming your Gearset team (or letting us create one for you using the name generator!) and entering a contact number. You can also opt into receiving occasional product updates by email. Your email subscription preferences can be managed later from the account page of the app.

profile

  • Click “Create account” to finish setting up your profile.

That’s it.  After signing in you will be redirected to Initial Setup Wizard. 

welcome gearset

Managing Salesforce connections:

  • Click on “METADATA DEPLOYMENTS”, Navigation bar will be opened on the left side of the page 
  • Click on Manage Salesforce orgs under My Salesforce Connections. You will see list orgs that are connected (if any).

manage sf orgs

  • To add a new connection, click “ADD NEW ORGANIZATION”. You will see different options to connect to Salesforce, click on any one of them and provide the required details

new sf org

  • If you choose Salesforce Authentication, enter salesforce username, select org type and click on Authorize. 
  • You’ll be prompted to log into Salesforce and authorize Gearset to access this org. Click “Allow” once you’ve logged in. Don’t worry, you’re not changing anything in this org at this stage, this is just allowing Gearset to read the metadata for your first comparison.

Managing Source Control Connections:

  • Go to METADATA DEPLOYMENTS, click on MANAGE SOURCE CONTROL AND JIRA 

manage source control

  • Click on + Connect to GitHub, It will redirect you to the GitHub login page give your credentials and Sign in. It’ll be directed Gearset page. You see the git username at GitHub (as shown in pic below)

git

Description of some of gearset features:

  1. Custom Comparison filters: Create and save your own customized metadata filters for fast, focused and reusable comparisons
  2. Advanced dependency analysis: Gearset automatically identifies and suggests which dependencies to include in your deployment packages, ensuring more successful deployments
  3. Version control: Full support for any git-based source control system lets you easily move metadata between repositories and your orgs
  4. Complete deployment history: View a full history of your deployments across all your orgs and download pdf reports to share with team members for a complete audit trail
  5. Deployment Rollback: Easily revert unwanted changes with full or partial rollback
  6. Automated change monitoring: Gain better visibility into changes made across your orgs with daily snapshots, change tracking and custom alerts with on-demand metadata backups for peace of mind
  7. Automated unit testing: Catch silent test failures, track changes to your code coverage and debug errors with easy automated testing
  8. Continuous Integration: Keep your orgs in sync and enjoy faster release cycles by creating easy, customizable CI jobs in just a few clicks
  9. Team collaboration: Experience greater visibility and control through setting team permission levels, delegating access to orgs, shared deployment history and collaborating on building deployment packages
  10. Jira Integration: Gearset will automatically post updates to your Jira ticket & provide a direct link to your deployments.
  11. Data deployments: Deploy data subsets between your orgs for more effective testing

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s