Contains helper commands related to CD Visibility.
The mark
command specifies that a CI job executes a deployment.
datadog-ci deployment mark [--env] [--revision] [--service] [--is-rollback] [--tags] [--no-fail]
For example:
datadog-ci deployment mark --env prod --service payment-service --revision v1.1.0 --tags team:backend --no-fail
--env
is the environment to which this deployment is performed. For example,prod
.--revision
is the revision/version that is being deployed. For example,1.0.0
orv123-456
.--service
the name of the service being deployed. For example,payment-service
.--is-rollback
specifies that the deployment is a rollback.--tags
is an array of key value pairs in the formatkey:value
. These tags are added to the deployment event shown in Datadog.--no-fail
(default:false
) prevents the deployment command from failing if there are issues submitting the data.
Note: If you are using datadog-ci deployment mark
, then you do not need to use this command, as the correlation is made automatically.
The correlate
command connects a GitOps deployment with the CI pipeline of the application repository. Once they are connected, you can see in Datadog's UI which pipeline
triggered a deployment, and which deployments were triggered by a pipeline.
Important: This command does not work for every setup. Refer to the documentation for more details.
For example:
datadog-ci deployment correlate --provider argocd
--provider
(required): the CD provider name. Currently, the only supported CD provider isargocd
.--config-repo
: configuration repository URL where the kubernetes manifests are stored. If empty, the command tries to get it using the git commandgit ls-remote --get-url
.--config-shas
: a list of the Git commit SHAs of the configuration repository. If empty, the command tries to get all local commits using agit log
command.--dry-run
(default:false
): prevents the command from sending any data to Datadog. All the other checks are still performed.
DD_API_KEY
(required): API key used to authenticate the requests.DD_SITE
: choose your Datadog site. For example, datadoghq.com or datadoghq.eu.
Additional helpful documentation, links, and articles: