You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/en/deployment_gates/setup.md
+20-6Lines changed: 20 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -239,8 +239,11 @@ spec:
239
239
{{% /tab %}}
240
240
{{% tab "Generic script" %}}
241
241
242
+
Use this script as a starting point. Be sure to replace the following:
242
243
243
-
Use this script as a starting point. For the API_URL variable, be sure to replace `<YOUR_DD_SITE>` with your [Datadog site name][1] (for example, {{< region-param key="dd_site" code="true" >}}).
244
+
- `<YOUR_DD_SITE>`: Your [Datadog site name][1] (for example, {{< region-param key="dd_site" code="true" >}})
245
+
- `<YOUR_API_KEY>`: Your [API key][2]
246
+
- `<YOUR_APP_KEY>`: Your [application key][3]
244
247
245
248
```bash
246
249
#!/bin/sh
@@ -386,6 +389,8 @@ The script has the following characteristics:
386
389
This is a general behavior, and you should change it based on your personal use case and preferences. The script uses `curl` (to perform the request) and `jq` (to process the returned JSON). If those commands are not available, install them at the beginning of the script (for example, by adding `apk add --no-cache curl jq`).
@@ -395,10 +400,15 @@ Deployment Gate evaluations are asynchronous, as the evaluation process can take
395
400
- First, request a Deployment Gate evaluation, which initiates the process and returns an evaluation ID.
396
401
- Then, periodically poll the evaluation status endpoint using the evaluation ID to retrieve the result when the evaluation is complete. Polling every 10-20 seconds is recommended.
397
402
398
-
A Deployment Gate evaluation can be requested with an API call:
403
+
A Deployment Gate evaluation can be requested with an API call.
404
+
405
+
Be sure to replace the following:
406
+
- `<YOUR_DD_SITE>`: Your [Datadog site name][1] (for example, {{< region-param key="dd_site" code="true" >}})
407
+
- `<YOUR_API_KEY>`: Your [API key][2]
408
+
- `<YOUR_APP_KEY>`: Your [application key][3]
399
409
400
410
```bash
401
-
curl -X POST "https://api.{{< region-param key="dd_site" >}}/api/unstable/deployments/gates/evaluation" \
411
+
curl -X POST "https://api.<YOUR_DD_SITE>/api/unstable/deployments/gates/evaluation" \
402
412
-H "Content-Type: application/json" \
403
413
-H "DD-API-KEY: <YOUR_API_KEY>" \
404
414
-H "DD-APPLICATION-KEY: <YOUR_APP_KEY>" \
@@ -438,7 +448,7 @@ The field `data.attributes.evaluation_id` contains the unique identifier for thi
438
448
You can fetch the status of a gate evaluation by polling an additional API endpoint using the gate evaluation ID:
439
449
440
450
```bash
441
-
curl -X GET "https://api.{{< region-param key="dd_site" >}}/api/unstable/deployments/gates/evaluation/<evaluation_id>" \
451
+
curl -X GET "https://api.<YOUR_DD_SITE>/api/unstable/deployments/gates/evaluation/<evaluation_id>" \
442
452
-H "DD-API-KEY: <YOUR_API_KEY>" \
443
453
-H "DD-APPLICATION-KEY: <YOUR_APP_KEY>"
444
454
```
@@ -455,14 +465,14 @@ When a 200 HTTP response is returned, it has the following format:
0 commit comments