Socket
Socket
Sign inDemoInstall

@datadog/datadog-ci

Package Overview
Dependencies
Maintainers
2
Versions
213
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@datadog/datadog-ci

Run datadog actions from the CI.


Version published
Maintainers
2
Created

What is @datadog/datadog-ci?

@datadog/datadog-ci is an npm package that provides a set of tools to interact with Datadog from your CI/CD pipelines. It allows you to upload test results, monitor performance, and manage various Datadog resources programmatically.

What are @datadog/datadog-ci's main functionalities?

Upload JUnit XML Test Reports

This feature allows you to upload JUnit XML test reports to Datadog. It helps in tracking test results and visualizing them in Datadog dashboards.

const { uploadJUnitXML } = require('@datadog/datadog-ci');

uploadJUnitXML({
  service: 'my-service',
  files: ['test-results.xml'],
  tags: ['env:ci', 'team:backend'],
  datadogSite: 'datadoghq.com',
  apiKey: 'your-datadog-api-key'
}).then(() => {
  console.log('Test results uploaded successfully');
}).catch((error) => {
  console.error('Error uploading test results:', error);
});

Synthetics Command

This feature allows you to run Datadog Synthetics tests from your CI/CD pipeline. It helps in monitoring the performance and availability of your applications.

const { synthetics } = require('@datadog/datadog-ci');

synthetics.runTests({
  publicIds: ['abc-123', 'def-456'],
  datadogSite: 'datadoghq.com',
  apiKey: 'your-datadog-api-key',
  appKey: 'your-datadog-app-key'
}).then((results) => {
  console.log('Synthetics tests results:', results);
}).catch((error) => {
  console.error('Error running synthetics tests:', error);
});

API Test

This feature allows you to run API tests defined in a configuration file. It helps in ensuring the reliability and correctness of your APIs.

const { apiTest } = require('@datadog/datadog-ci');

apiTest.run({
  configPath: './api-test-config.json',
  datadogSite: 'datadoghq.com',
  apiKey: 'your-datadog-api-key',
  appKey: 'your-datadog-app-key'
}).then((results) => {
  console.log('API test results:', results);
}).catch((error) => {
  console.error('Error running API tests:', error);
});

Other packages similar to @datadog/datadog-ci

FAQs

Package last updated on 23 Sep 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚑️ by Socket Inc