Execute commands from your Continuous Integration (CI) and Continuous Delivery (CD) pipelines to integrate with existing Datadog products.
See the Usage section for a list of available commands.
The package is under @datadog/datadog-ci and can be installed through NPM or Yarn:
# NPMnpm install --save-dev @datadog/datadog-ci# Yarnyarn add --dev @datadog/datadog-ci
If you need datadog-ci
as a CLI tool instead of a package, you can run it with npx
or install it globally:
# npxnpx @datadog/datadog-ci [command]# NPM install globallynpm install -g @datadog/datadog-ci# Yarn v1 add globallyyarn global add @datadog/datadog-ci
For more ways to install the CLI, see this section.
Usage: datadog-ci[ ] [options]
The following values are available for each
and (optionally)
.
See each command's linked README for more details, or click on ? to see the related documentation page.
cloud-run
flare
: Troubleshoot your issues with Cloud Run service configuration. ?
dsyms
upload
: Upload iOS dSYM files for Error Tracking (macOS only). ?
flutter-symbols
upload
: Upload Flutter symbols for Error Tracking. ?
unity-symbols
upload
: Upload Unity symbols for Error Tracking.
git-metadata
upload
: Upload Git metadata for the Source Code Integration. ?
junit
upload
: Upload JUnit test reports for Test Visibility. ?
lambda
flare
: Troubleshoot your issues with Datadog instrumentation on your AWS Lambda functions.
instrument
: Apply Datadog instrumentation to the given AWS Lambda functions.
uninstrument
: Revert Datadog instrumentation from the given AWS Lambda functions.
measure
Add measures to a CI Visibility pipeline trace or job span in Datadog. ?
react-native
codepush
: Upload React Native CodePush sourcemaps for Error Tracking. ?
upload
: Upload React Native sourcemaps for Error Tracking. ?
xcode
: Upload React Native sourcemaps for Error Tracking from the XCode bundle build phase. ?
sarif
upload
: Upload Static Analysis Results Interchange Format (SARIF) reports to Datadog. ?
sbom
upload
: Upload Software Bill of Materials (SBOM) files to Datadog. ?
sourcemaps
upload
: Upload JavaScript sourcemaps for Error Tracking. ?
stepfunctions
instrument
: Instrument AWS Step Function with Datadog to get logs and traces. ?
uninstrument
: Uninstrument AWS Step Function. ?
synthetics
run-tests
: Run Continuous Testing tests from the CI. ?
upload-application
: Upload a new version to an existing mobile application in Datadog. ?
tag
Add custom tags to a CI Visibility pipeline trace or job span in Datadog. ?
trace
Add custom commands to a CI Visibility pipeline in Datadog. ?
The following are beta commands, you can enable them with with DD_BETA_COMMANDS_ENABLED=1
:
deployment
mark
: Mark a CI job as a deployment. ?
correlate
: Correlate GitOps CD deployments with application repositories CI pipelines. ?
dora
deployment
: Send a new deployment event for DORA Metrics to Datadog. ?
elf-symbols
upload
: Upload Elf debug info files for Profiling (requires binutils). ?
gate
evaluate
: Evaluate Quality Gates rules in Datadog. ?
If installing NodeJS in the CI is an issue, standalone binaries are provided with releases. linux-x64, linux-arm64, darwin-x64, darwin-arm64 (MacOS) and win-x64 (Windows) are supported.
To install:
curl -L --fail "https://github.com/DataDog/datadog-ci/releases/latest/download/datadog-ci_linux-x64" --output "/usr/local/bin/datadog-ci" && chmod +x /usr/local/bin/datadog-ci
curl -L --fail "https://github.com/DataDog/datadog-ci/releases/latest/download/datadog-ci_darwin-x64" --output "/usr/local/bin/datadog-ci" && chmod +x /usr/local/bin/datadog-ci
Invoke-WebRequest -Uri "https://github.com/DataDog/datadog-ci/releases/latest/download/datadog-ci_win-x64" -OutFile "datadog-ci.exe"
Then, you can run datadog-ci
commands normally:
datadog-ci version
To run datadog-ci
from a container, you can use the datadog/ci
image available in Docker Hub as well as the public Amazon ECR and Google GC registries.
docker pull datadog/ci
This example demonstrates how to run a command using the container and passing in the API and app keys:
export DD_API_KEY=$(cat /secret/dd_api_key)export DD_APP_KEY=$(cat /secret/dd_app_key)docker run --rm -it -v $(pwd):/w -e DD_API_KEY -e DD_APP_KEY datadog/ci synthetics run-tests -p pub-lic-id1
You can build an image using the provided Dockerfile:
cd container docker build --tag datadog-ci .
Optionally, you can use the VERSION
build argument to build an image for a specific version:
docker build --build-arg "VERSION=v1.14" --t datadog-ci .
Before contributing to this open source project, read our CONTRIBUTING.md.
Apache License, v2.0