DataDog / datadog-ci

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

I can't tell what `--disable-git` does for `sourcemaps upload` #1087

Open dbalatero opened 1 year ago

dbalatero commented 1 year ago

Our deploy pipeline operates on a shallow clone of our Git repository, and does not have a .git folder. This is causing the following error message to be written when we attempt to upload sourcemaps:

$ datadog-ci sourcemaps upload ...

1033 | @monologue/graphite-app:prod-build: version: 985f396a538677c1b02808a80c9202b78d479128 service: graphite-app project path:
1034 | @monologue/graphite-app:prod-build: ⚠️ An error occured while invoking git: Error: fatal: not a git repository (or any parent up to mount point /codebuild)
1035 | @monologue/graphite-app:prod-build: Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
1036 | @monologue/graphite-app:prod-build:
1037 | @monologue/graphite-app:prod-build: Make sure the command is running within your git repository to fully leverage Datadog's git integration.
1038 | @monologue/graphite-app:prod-build: To ignore this warning use the --disable-git flag.

I'm open to passing the --disable-git flag, but I cannot tell what features I'm going to break by enabling the flag. The documentation does not make this clear.

Can you clarify what --disable-git breaks if I enable it? I'd like to see:

if it's easy enough to add!

dbalatero commented 1 year ago

Related issue: https://github.com/DataDog/datadog-ci/issues/753