Salesforce continuous integration with Gearset

Jason Mann on September 20th 2016


Continuous integration (CI) has been one of the most hotly requested features in Gearset. From keeping sandboxes in sync to pushing changes from source control to your dev org, continuous integration provides the power to streamline your releases.

We’re excited to announce that Gearset now has CI built in. Create, monitor, and track continuous integration jobs between your Salesforce orgs, and even share the results with your team. It’s all the power and intelligence of Gearset, automated.

The challenge of continuous integration in Salesforce

Continuous integration is a well-established aspect of mature application lifecycle management. It saves time by automating manual processes, reduces the chances of human-error, and speeds up release cycles by avoiding code conflict and duplication of work.

The challenge of CI has always been the barrier to entry. Setting up a CI service traditionally required a lot of time and effort, with specific technical knowledge around automation software such as Jenkins. For many, it was beyond their reach.

This complexity is confounded by the nuances of Salesforce deployments which set it apart from other platforms. Many cross-platform CI solutions are great at automation, but leave the struggle of building a valid Salesforce package to you. Manually building packages is a slow process, and can wipe out any benefits of automation in the first place.

CI in Gearset is simple

With CI in Gearset, we have maintained the power of automation, and combined it with our deep understanding of metadata and intuitive user interface. The result? Simple, effective automation with no complex setup and no manual package creation.

Each time a job runs, Gearset will automatically compare your orgs, select the metadata you specify, then analyze it and find any dependencies through our advanced problem analyzers. It then builds the package, runs your tests, and deploys the changes across. A deployment report is saved in your history, along with the package created, and we'll notify you using your configured options.

CI is an Enterprise-only feature. If you’re currently on a Pro subscription and you’d like to chat about upgrading to Enterprise to take advantage of CI, just get in touch at team@gearset.com.

Setting up a CI job in Gearset

Head to the CI jobs menu item in the app. From here, you can create and edit jobs, and view their activity history. Just like change monitoring and test automation in Gearset, CI jobs will be shared and visible between members of the same team.

1. On the CI jobs tab, click Add new job. Give the job a descriptive name - this will be used in the notification options set in a later step.

Name your CI job

2. CI jobs run much like normal deployments: you need a source and a target to compare. For the source, select whether you’ll be using a Salesforce org, or a linked source control account, and select the desired item from the dropdown. You can add more org connections from the manage orgs tab.

Choose source location

3. Initially, the target of your CI job must be a Salesforce org. Choose your target org from the list of authorized orgs.

Choose target location

4. Using the metadata filter dropdown, you can specify which metadata types your job will compare and deploy between your source and target. If you don’t have any custom filters set up, it will default to a standard CI job set. You can create your own customized metadata filters from the Compare & Deploy page of the app.

Note: the default CI comparison set includes the following metadata types: Custom Object, Apex class, Apex component, Apex page, Apex trigger, Profile.

Choose the metadata filter

5. Finally, set your notification options. The results of your CI job can be emailed, sent via SMS, integrated into Slack, or posted to Chatter.

Set notification options

6. Click save to create your CI job. By default, CI jobs are set to run at 4-hourly intervals: 00:00, 04:00, 08:00, 12:00, 16:00, 20:00 (local time). We'll be releasing user configurable timing in the coming weeks.

CI job frequency

Viewing CI job history

Each CI job maintains a full deployment history which can be viewed at any point.

1. From the CI jobs page, you can see the most recent status of your CI jobs.

View CI job status

2. Click view history to see the run-by-run breakdown of the job. For each run, you’ll see a summary of the changes that were attempted to be deployed.

Inspect CI job history

3. For successful CI job runs, you’ll be able to download the deployment report, package deployed, and the CSV summary, just like any other deployment in the app.

Download CI reports

4. For CI jobs when the deployment was unsuccessful, clicking the view errors button will show you the full list of deployment errors. These can be exported as a CSV file for easy reference and debugging.

Debug deployment errors

Over the coming months, we’ll continue to expand and enhance our CI offering. We’re really keen to hear your feedback: if you have any suggestions, get in touch via the in-app chat or send an email to team@gearset.com.

Happy deploying!

Ready to get started with Gearset?

Sign up now to start your completely free 30 day trial
try it now