You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using the datadog junit upload action, the --git-repository-url provided through extra-args is not changing the way the git metadata are retrieved and seems to always retrieve the data from the local git repo.
Example ; by specifying --git-repository-url [email protected]/<myorg>/<myrepo>.git#<commi-sha>
I would expect that the tag git.repository.name visible in the tests tags would be <myorg>/<myrepo> but it is the local repository instead.
Describe what you expected
The git tag content visible in datadog shows the metadata for the repository specified in --git-repository-url .
Steps to reproduce the issue
From a repository call the github action to upload a report with the extra-args providing the --git-repository-url:
- name: Send integration test report to Datadog Test Visibility
if: always()
uses: datadog/junit-upload-github-action@c4b57b587ae0e3ed618a1f0e7a7d260cfde53032 # v1.4.0 (use commit hash for codacy compliance)
with:
api_key: ${{ env.DATADOG_API_KEY }}
service: dome-service
files: report.xml
env: testing
extra-args: --git-repository-url [email protected]/<some-org>/<some-other-repo>.git#<some-sha>
Example of command execution visible in my github actions logs:
The github action is triggered in a repo that is not the repo where the tests are. So when we upload the report, we want the git metadate to be the one from the repo that contains the tests.
I tried setting DD_GIT_REPOSITORY_URL and DD_GIT_COMMIT_SHA environment variable and it is giving the proper results.
I think that you have an error in the doc here because the --git-repository-url option is listed but we are in a section talking about the datadog-ci junit upload command.
Based on your previous comment it should be --repository-url
can you confirm that the --repository-url supports providing the ref (branch or commit) along with the URL ?
Using the env vars works and I can provide the commit, if I go back to the --repository-url I'd like to have the commit provided as well.
The github action is triggered in a repo that is not the repo where the tests are. So when we upload the report, we want the git metadate to be the one from the repo that contains the tests.
I see. That's a use case that's not supported at all in our product at the moment.
I think that you have an error in the doc here because the --git-repository-url option is listed but we are in a section talking about the datadog-ci junit upload command.
Based on your previous comment it should be --repository-url
the option is indeed --git-repository-url. My comment was to clarify what that flag does, which is the same as what --repository-url does for datadog-ci git-metadata upload. This flag does not support your use case.
Bug description
Using the datadog junit upload action, the
--git-repository-url
provided through extra-args is not changing the way the git metadata are retrieved and seems to always retrieve the data from the local git repo.Example ; by specifying
--git-repository-url [email protected]/<myorg>/<myrepo>.git#<commi-sha>
I would expect that the tag
git.repository.name
visible in the tests tags would be<myorg>/<myrepo>
but it is the local repository instead.Describe what you expected
The
git
tag content visible in datadog shows the metadata for the repository specified in--git-repository-url
.Steps to reproduce the issue
From a repository call the github action to upload a report with the extra-args providing the
--git-repository-url
:Example of command execution visible in my github actions logs:
Additional context
Github action 1.4.0
Command
junit
The text was updated successfully, but these errors were encountered: