How to register a deploy

Notifying Sleuth when you deploy

How does Sleuth know when you have deployed? There are three different ways Sleuth can be notified:
We highly recommend precise deploy registration. Knowing exactly when you've made your deploy unlocks the truly powerful features of Sleuth such as Impact tracking, notifications and more.

Precise deploy detection from completed CI/CD builds

When this option is selected Sleuth will guide you through a CI/CD mapping step where you'll map a build / job / pipeline name to each Sleuth environment. Sleuth will then automatically register a deploy on a successfully completed build / job / pipeline that matches the mapped name.
When using CI/CD build deploy detection there is no need to modify your build scripts or change the way you deploy, Sleuth does all the work and will track your deploys precisely and automatically.
For example, we use CircleCI where we have many jobs, but only two are relevant for deploy registration. These are deploy-prod and deploy-stage, so our mapping between CI/CD and Sleuth environments looks like so:
Sleuth is only able to do auto deploy detection from CI/CD builds for our supported CI/CD integrations. If you don't see your CI/CD provider please reach out and let us know. We're always adding new Integrations and are prioritizing as demand dictates.
Keep in mind that even without a supported provider you can still achieve precise tracking using our webhook registration.

Precise deploy registration via a webhook

Ping Sleuth with a Git commit SHA or a tag to tell Sleuth you've deployed by making a POST request. You'll need to provide theses values when making the call:
  • YOUR_API_KEY
  • YOUR_SHA
  • ORG_NAME
  • PROJECT_NAME
You can find your API Key in Organization Settings > Details > Api key:
Locating your Sleuth API key
You can find YOUR_SHA using the commands:
1
git checkout YOUR_BRANCH
2
git rev-parse HEAD
Copied!
Get more detailed information on precisely registering a deploy via the Sleuth API.

Approximate – automatic tracking for each PR merged

When this option is selected Sleuth will treat every merged PR on your branch as a deploy.
Sleuth allows you to specify a delay in minutes. When this is set Sleuth will only create the deploy after the delay has passed. A delay of 0 will create the deploy immediately.

Approximate – automatic tracking for each push to the configured branch

When this option is selected Sleuth will treat every commit made to your branch as a deploy.
Sleuth allows you to specify a delay in minutes. When this is set Sleuth will only create the deploy after the delay has passed. A delay of 0 will create the deploy immediately.
It's rarely the case that every commit is a deploy. Only true continuous deployment setups deploy every commit.

Approximate – automatic tracking for each tag made against the configured branch

When this option is selected Sleuth will treat every tag made on your branch as a deploy.
Sleuth allows you to specify a delay, in minutes. When this is set Sleuth will only create the deploy after the delay has elapsed. A delay of 0 will create the deploy immediately.
If you've chosen this option make sure that your CD system is tagging your code only once it's actually been deployed.