- 필수 기능
- 시작하기
- Glossary
- 표준 속성
- Guides
- Agent
- 통합
- 개방형텔레메트리
- 개발자
- Administrator's Guide
- API
- Datadog Mobile App
- CoScreen
- Cloudcraft
- 앱 내
- 서비스 관리
- 인프라스트럭처
- 애플리케이션 성능
- APM
- Continuous Profiler
- 스팬 시각화
- 데이터 스트림 모니터링
- 데이터 작업 모니터링
- 디지털 경험
- 소프트웨어 제공
- 보안
- AI Observability
- 로그 관리
- 관리
CD Visibility for CI provider deployments is in Preview. If you're interested in this feature, complete the form to request access.
Request AccessDeployments can be performed in your continuous integration (CI) pipelines. Typically, these pipelines have a deployment step that is executed after the source code is tested and the image is built.
If you are executing deployments using a CI provider, you can monitor your deployments with Deployment Visibility. Ensure the following requirements are met:
datadog-ci
CLI version `2.26.0` or later.To set up CD Visibility, use the datadog-ci deployment mark
command inside the CI job that is performing the deployment.
Two environment variables are required:
DD_API_KEY
: Point to your Datadog API key.DD_BETA_COMMANDS_ENABLED
: Set to 1.Optionally, you can set DD_SITE
environment variable to a specific Datadog site. Your site is .
You can enrich the deployment event that is generated by the datadog-ci deployment mark
command using the following parameters:
Parameter | Description |
---|---|
--env | The environment to which this deployment is performed. For example, prod . |
--service | The name of the service being deployed. For example, transaction-service . This option requires datadog-ci version 2.31.1 or later |
--revision | The revision or version that is being deployed. For example, 1.0.0 or v123-456 . |
--is-rollback | Specifies that the deployment is a rollback. |
--tags | An array of key-value pairs in the key:value format. These tags are added to the deployment event shown in Datadog. |
Use --no-fail
(default: false
) to prevent the deployment command from failing if there are issues submitting the data.
If you are using GitHub Actions as your CI provider, see the section below for additional considerations.
Once you have added the command to a CI job, the Deployments page and the Deployment Executions Explorer populates with data after pipelines are executed. For more information, see Search and Manage Deployments and the CD Visibility Explorer documentation.
This set of commands specifies that the CI job executes a deployment to the prod
environment with version 1.0.0
:
export DD_BETA_COMMANDS_ENABLED=1
export DD_API_KEY="<YOUR_API_KEY>"
export DD_SITE=
datadog-ci deployment mark --env prod --revision 1.0.0
This set of commands specifies that the CI job performs a rollback deployment to the prod
environment:
export DD_BETA_COMMANDS_ENABLED=1
export DD_API_KEY="<YOUR_API_KEY>"
export DD_SITE=
datadog-ci deployment mark --env prod --is-rollback
This set of commands specifies that the CI job executes a deployment to the prod
environment and adds the team:backend
and reason:scheduled
tags to the deployment event:
export DD_BETA_COMMANDS_ENABLED=1
export DD_API_KEY="<YOUR_API_KEY>"
export DD_SITE=
datadog-ci deployment mark --env prod --tags team:backend --tags reason:scheduled
To mark GitHub jobs as deployments, datadog-ci CLI
version 2.29.0
or higher is required.
If the job name does not match the entry defined in the workflow configuration file (the GitHub job ID),
the DD_GITHUB_JOB_NAME
environment variable needs to be exposed, pointing to the job name. For example:
If the job name is changed using the name property:
jobs:
deploy:
name: My deployment job name
env:
DD_GITHUB_JOB_NAME: My deployment job name
steps:
- run: datadog-ci deployment mark ...
If the matrix strategy is used, several job names are generated by GitHub by adding the matrix values at the end of the job name,
within parenthesis. The DD_GITHUB_JOB_NAME
environment variable should then be conditional on the matrix values:
jobs:
deployment:
strategy:
matrix:
env: [dev, staging]
env:
DD_GITHUB_JOB_NAME: deployment (${{ matrix.env }})
steps:
- run: datadog-ci deployment mark ...