jenkinsci / datadog-plugin

A Jenkins plugin used to forward metrics, events, and service checks to an account at Datadog, automatically.
https://plugins.jenkins.io/datadog/
MIT License
34 stars 48 forks source link

Support declarative Test Visibility configuration in pipeline scripts #375

Closed nikita-tkachenko-datadog closed 9 months ago

nikita-tkachenko-datadog commented 9 months ago

Requirements for Contributing to this repository

What does this PR do?

Adds support for configuring Test Visibility in pipeline scripts using datadog step. A new testVisibility property is added to the step, allowing to use automatic Test Visibility configuration in pipelines that do not support UI config (e.g. multi-branch pipelines found inside organization folders).

Description of the Change

If datadog step is present in the pipeline definition and testVisibility block is configured, DatadogTracerJobProperty property is registered in the job. Existing code that handles the property does the rest.

Alternate Designs

Possible Drawbacks

Verification Process

Verified manually using a local Jenkins instance. Integration test added.

Additional Notes

Release Notes

Review checklist (to be filled by reviewers)