Skip to content

ci:upload test results to datadog#17206

Merged
jmurret merged 8 commits into
mainfrom
jm/NET-3692
May 10, 2023
Merged

ci:upload test results to datadog#17206
jmurret merged 8 commits into
mainfrom
jm/NET-3692

Conversation

@jmurret
Copy link
Copy Markdown
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 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
Copy Markdown
Contributor

loshz commented May 8, 2023

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

@jmurret
Copy link
Copy Markdown
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

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