Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci:upload test results to datadog #17206

Merged
merged 8 commits into from
May 10, 2023
Merged

ci:upload test results to datadog #17206

merged 8 commits into from
May 10, 2023

Conversation

jmurret
Copy link
Member

@jmurret jmurret commented May 1, 2023

Description

Currently our workflow and job information is uploaded to datadog. Test information is not. This PR uploads the junit results file to DataDog.

Testing & Reproduction steps

  1. go to theupload coverage step of any test job.
  2. It will give you the below output and you can verify there. Example job is: https://github.com/hashicorp/consul/actions/runs/4916931172/jobs/8781403486?pr=17206
Run datadog-ci junit upload --service "$GITHUB_REPOSITORY" $TEST_RESULTS_DIR/results.xml
Starting upload with concurrency 20. 
Will upload jUnit XML file /tmp/test-results/results.xml
service: hashicorp/consul
Uploading jUnit XML test report file in /tmp/test-results/results.xml
✅ Uploaded [1](https://github.com/hashicorp/consul/actions/runs/4916931172/jobs/8781403486?pr=17206#step:12:1) files in 0.199 seconds.
Syncing git metadata...
[unshallow] Git repository is a shallow clone., unshallowing it...
[unshallow] Setting remote.origin.partialclonefilter to "blob:none" to avoid fetching file content
[unshallow] Running git fetch --shallow-since="1 month ago" --update-shallow --refetch
[unshallow] Fetch completed.
✅ Synced git metadata in 7.016 seconds.
=================================================================================================
* View detailed reports on Datadog (they can take a few minutes to become available)
* Commit report:
* https://app.datadoghq.com/ci/redirect/tests/https%3A%2F%2Fgithub.com%2Fhashicorp%2Fconsul.git/-/hashicorp%2Fconsul/-/jm%2FNET-3692/-/8642c685c7cd4[17](https://github.com/hashicorp/consul/actions/runs/4916931172/jobs/8781403486?pr=17206#step:12:18)8a1a963bf392f61fe4a9c437f?env=ci
* Test runs report:
* https://app.datadoghq.com/ci/test-runs?query=%[20](https://github.com/hashicorp/consul/actions/runs/4916931172/jobs/8781403486?pr=17206#step:12:21)%40ci.job.url%3A%[22](https://github.com/hashicorp/consul/actions/runs/4916931172/jobs/8781403486?pr=17206#step:12:23)https%3A%2F%2Fgithub.com%2Fhashicorp%2Fconsul%2Fcommit%2F8642c685c7cd4178a1a963bf392f61fe4a9c437f%2Fchecks%22
=================================================================================================

Links

PR Checklist

  • updated test coverage
  • external facing docs updated
  • appropriate backport labels added
  • not a security concern

@jmurret jmurret added pr/no-changelog PR does not need a corresponding .changelog entry backport/1.13 backport/1.15 This release series is no longer active on CE. Use backport/ent/1.15. pr/no-backport labels May 1, 2023
@github-actions github-actions bot added theme/contributing Additions and enhancements to community contributing materials type/ci Relating to continuous integration (CI) tooling for testing or releases labels May 1, 2023
@jmurret jmurret marked this pull request as ready for review May 2, 2023 03:19
@jmurret jmurret requested a review from loshz May 2, 2023 03:25
@loshz
Copy link
Contributor

loshz commented May 8, 2023

LGTM - do we have a link to DD to verify the uploads?

@jmurret
Copy link
Member Author

jmurret commented May 8, 2023

@loshz yes. (I'll also add this to the PR description).

if you look in the upload coverage step of any test job it will give you the below output and you can verify there. Example job is: https://github.com/hashicorp/consul/actions/runs/4916931172/jobs/8781403486?pr=17206

Run datadog-ci junit upload --service "$GITHUB_REPOSITORY" $TEST_RESULTS_DIR/results.xml
Starting upload with concurrency 20. 
Will upload jUnit XML file /tmp/test-results/results.xml
service: hashicorp/consul
Uploading jUnit XML test report file in /tmp/test-results/results.xml
✅ Uploaded [1](https://github.com/hashicorp/consul/actions/runs/4916931172/jobs/8781403486?pr=17206#step:12:1) files in 0.199 seconds.
Syncing git metadata...
[unshallow] Git repository is a shallow clone., unshallowing it...
[unshallow] Setting remote.origin.partialclonefilter to "blob:none" to avoid fetching file content
[unshallow] Running git fetch --shallow-since="1 month ago" --update-shallow --refetch
[unshallow] Fetch completed.
✅ Synced git metadata in 7.016 seconds.
=================================================================================================
* View detailed reports on Datadog (they can take a few minutes to become available)
* Commit report:
* https://app.datadoghq.com/ci/redirect/tests/https%3A%2F%2Fgithub.com%2Fhashicorp%2Fconsul.git/-/hashicorp%2Fconsul/-/jm%2FNET-3692/-/8642c685c7cd4[17](https://github.com/hashicorp/consul/actions/runs/4916931172/jobs/8781403486?pr=17206#step:12:18)8a1a963bf392f61fe4a9c437f?env=ci
* Test runs report:
* https://app.datadoghq.com/ci/test-runs?query=%[20](https://github.com/hashicorp/consul/actions/runs/4916931172/jobs/8781403486?pr=17206#step:12:21)%40ci.job.url%3A%[22](https://github.com/hashicorp/consul/actions/runs/4916931172/jobs/8781403486?pr=17206#step:12:23)https%3A%2F%2Fgithub.com%2Fhashicorp%2Fconsul%2Fcommit%2F8642c685c7cd4178a1a963bf392f61fe4a9c437f%2Fchecks%22
=================================================================================================

@jmurret jmurret merged commit e9986e3 into main May 10, 2023
@jmurret jmurret deleted the jm/NET-3692 branch May 10, 2023 20:49
jmurret added a commit that referenced this pull request May 10, 2023
* WIP

* ci:upload test results to datadog

* fix use of envvar in expression

* getting correct permission in reusable-unit.yml

* getting correct permission in reusable-unit.yml

* fixing DATADOG_API_KEY envvar expresssion

* pass datadog-api-key

* removing type from datadog-api-key
jmurret added a commit that referenced this pull request May 10, 2023
* WIP

* ci:upload test results to datadog

* fix use of envvar in expression

* getting correct permission in reusable-unit.yml

* getting correct permission in reusable-unit.yml

* fixing DATADOG_API_KEY envvar expresssion

* pass datadog-api-key

* removing type from datadog-api-key
jmurret added a commit that referenced this pull request May 11, 2023
* WIP

* ci:upload test results to datadog

* fix use of envvar in expression

* getting correct permission in reusable-unit.yml

* getting correct permission in reusable-unit.yml

* fixing DATADOG_API_KEY envvar expresssion

* pass datadog-api-key

* removing type from datadog-api-key
jmurret added a commit that referenced this pull request May 23, 2023
* WIP

* ci:upload test results to datadog

* fix use of envvar in expression

* getting correct permission in reusable-unit.yml

* getting correct permission in reusable-unit.yml

* fixing DATADOG_API_KEY envvar expresssion

* pass datadog-api-key

* removing type from datadog-api-key
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/1.15 This release series is no longer active on CE. Use backport/ent/1.15. pr/no-backport pr/no-changelog PR does not need a corresponding .changelog entry theme/contributing Additions and enhancements to community contributing materials type/ci Relating to continuous integration (CI) tooling for testing or releases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants