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

Do not map "unstable" status to "success" #331

Closed albertvaka closed 1 year ago

albertvaka commented 1 year ago

What does this PR do?

When the result of a job, stage or pipeline is unstable, do not map it to success when sending webhooks. The webhooks intake now accepts unstable as a status. This lets us remove the two different mappings (jenkins result -> ci visibility status) we had depending on whether we send webhooks or traces.

It also removes some unused variables and imports, sorry if it adds a bit of noise to the PR.

Review checklist (to be filled by reviewers)