DataDog / datadog-ci

Use Datadog from your CI.
https://datadoghq.com
Apache License 2.0
124 stars 54 forks source link

Manually send github context with source maps #355

Open blazzy opened 3 years ago

blazzy commented 3 years ago

Is your feature request related to a problem? Please describe:

We use the disable-git flag when sending source maps but would still like to send git details to data dog. Our build environment can have access to all kinds of info via environment variables, but it does not have direct access to the git command or even .git folder. There is a way to specify --repository-url, but that doesn't seem to be enough. I assume additional flags would be needed to send revision information and whatever else might be necessary.

Describe the solution you'd like:

I would like to be able to manually send revision information to data dog instead of relying on datadog-ci tool to invoke git for me.

lraucy commented 2 years ago

Hey @blazzy ! Thank you for the feature request. The thing is we use the local .git access to verify that paths referenced in the sourcemap are indeed present in the repository, and what is their exact path within the repository. The revision information required is the list of tracked file paths, which doesn't seem super convenient to pass manually in your case?

We definitely want to get rid of that constraint in the long term but this has not been prioritized yet.

JBallin commented 1 year ago

We also don't install git in our image, so I would like to be able pass whatever data is needed via CLI/env vars when using npx.

I was thinking that a workaround would be to copy the source files over to the jenkins workspace (where we have git) and then run the binary CLI from there (where we don't have node).