- 重要な情報
- はじめに
- 用語集
- エージェント
- インテグレーション
- OpenTelemetry
- 開発者
- API
- CoScreen
- アプリ内
- インフラストラクチャー
- アプリケーションパフォーマンス
- 継続的インテグレーション
- ログ管理
- セキュリティ
- UX モニタリング
- 管理
Add Continuous Testing tests to your Jenkins environment.
Datadog recommends discussing with your SRE and Infrastructure teams to determine a solution that models your existing Jenkins architecture and customizes an installation that fits your business requirements.
To use Docker in your Jenkins environment, see Using Docker with Pipeline.
You can store environment variables directly within the global configuration file or use credentials. For more information about test configurations, see Configure tests.
@datadog/datadog-ci
packageInstall and run the Node.js and npm packages within your Jenkins environment with the Jenkins Node.js plugin.
For more information about the existing Datadog-Jenkins integration, see Set up Tracing on a Jenkins Pipeline.
Navigate to the global Jenkins Configuration panel and add a Node.js installation.
Install @datadog/datadog-ci
globally for all relevant Node.js installations.
To run Continuous Testing tests with tags in a Jenkins Declarative pipeline:
pipeline {
agent any
stages {
stage('Run e2e tests') {
steps {
withCredentials([string(credentialsId: 'datadog-api-key', variable: 'DATADOG_API_KEY'), string(credentialsId: 'datadog-app-key', variable: 'DATADOG_APP_KEY')]) {
nodejs(nodeJSInstallationName: 'Node 10.24.x') {
configFileProvider(
[configFile(fileId: 'config-file-id', variable: 'DATADOG_CI_CONFIG')]) {
sh 'datadog-ci synthetics run-tests -s "tag:e2e" --config $DATADOG_CI_CONFIG'
}
}
}
}
}
}
To run Continuous Testing tests with a custom test file in a Jenkins Declarative pipeline:
pipeline {
agent any
stages {
stage('Run e2e tests') {
steps {
withCredentials([string(credentialsId: 'datadog-api-key', variable: 'DATADOG_API_KEY'), string(credentialsId: 'datadog-app-key', variable: 'DATADOG_APP_KEY')]) {
nodejs(nodeJSInstallationName: 'Node 10.24.x') {
configFileProvider(
[configFile(fileId: 'config-file-id', variable: 'DATADOG_CI_CONFIG'), configFile(fileId: 'test-file-id', variable: 'DATADOG_CI_TEST_FILE')]) {
sh 'datadog-ci synthetics run-tests -f $DATADOG_CI_TEST_FILE --config $DATADOG_CI_CONFIG'
}
}
}
}
}
}
}
You can expect the following output: