Turbocharge your Salesforce continuous integration jobs with GitHub webhooks

Oli Lane on October 16th 2016


Last week, we were thrilled to release one of our most anticipated features yet: built in continuous integration (CI) unlocks a whole new avenue of powerful release management possibilities. We’re not fans of resting on our laurels around here at Gearset HQ, though, so this week we’re already shipping a huge improvement to the way CI works with GitHub.

By default, CI jobs run at 4-hourly intervals, automatically syncing changes from your source to your chosen target org. That’s great, but we can do better!

Introducing webhooks

Webhooks allow Gearset to detect changes pushed to a GitHub repository in real time, without having to poll to see if anything has changed. Whenever you push to the repository you’ve set up, Gearset will immediately pick those changes up and sync them to your target.

This gives two distinct advantages:

  • The job will only run when there are actual changes
  • When there are changes, the job will run straight away instead of waiting for the next scheduled period
Setting up a CI job with a webhook

You can set up a job using webhooks the same way as any other CI job. Head to the CI jobs menu item in the app, and click Add new job.

Configure your CI job in the usual way, selecting a GitHub repository and branch as your source. Once you’ve selected your GitHub source, you’ll now be able to set your job to run when the source branch is updated:

Set your CI job to run with webhooks

Save your job, and a new dialog will appear with instructions on how to set up the webhook in GitHub:

Set up a webhook on GitHub

You just need to copy over the payload URL and the shared secret shown, and save the new webhook. Now, any time you push to the branch you’ve set up, Gearset will trigger the associated job.

Add a webhook on GitHub

We’ll continue to improve and extend our CI offering over the next few months, including adding webhook support for the other VCS providers which we integrate with.

We’d love to hear your feedback so that we can guide those improvements - get in touch via the in-app chat or send an email to [email protected].

Ready to get started with Gearset?

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