Skip to content

Commit

Permalink
add canary health check to gocd pipeline (#5638)
Browse files Browse the repository at this point in the history
  • Loading branch information
enochtangg committed Mar 11, 2024
1 parent c3cdb9e commit 98bd2b3
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
8 changes: 8 additions & 0 deletions gocd/templates/bash/canary-ddog-health-check.sh
@@ -0,0 +1,8 @@
#!/bin/bash

/devinfra/scripts/checks/datadog/monitor_status.py --dry-run=true \
140973101


# Above monitor IDs 140973101 map to following monitors:
# Snuba API Health Check is Failing
12 changes: 12 additions & 0 deletions gocd/templates/pipelines/snuba.libsonnet
Expand Up @@ -135,6 +135,18 @@ local deploy_canary_stage(region) =
gocdtasks.script(importstr '../bash/deploy.sh'),
],
},
health_check: {
environment_variables: {
SENTRY_AUTH_TOKEN: '{{SECRET:[devinfra-sentryio][token]}}',
DATADOG_API_KEY: '{{SECRET:[devinfra][sentry_datadog_api_key]}}',
DATADOG_APP_KEY: '{{SECRET:[devinfra][sentry_datadog_app_key]}}',
LABEL_SELECTOR: 'service=snuba,is_canary=true',
},
elastic_profile_id: 'snuba',
tasks: [
gocdtasks.script(importstr '../bash/canary-ddog-health-check.sh'),
],
},
},
},
},
Expand Down

0 comments on commit 98bd2b3

Please sign in to comment.