Skip to content

Commit

Permalink
Merge pull request #181 from quarkusio/gsmet-patch-1
Browse files Browse the repository at this point in the history
More doc
  • Loading branch information
gsmet authored Apr 10, 2024
2 parents 18833e1 + e7eed15 commit a09d259
Showing 1 changed file with 58 additions and 0 deletions.
58 changes: 58 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,64 @@ and the monitored workflows from the configuration file hosted in the repository

It is important to listen to both the `@WorkflowRun.Completed` and the `@WorkflowRun.Requested` events.

That is all for the GitHub App part.
You also need to upload the reports as artifacts of the workflow run in your GitHub Action workflow file.

For instance, to upload the build reports of a job named `JVM Tests - JDK ${{matrix.java.name}}`, you would use:

```yaml
- name: Upload build reports
uses: actions/upload-artifact@v4
if: always()
with:
name: "build-reports-JVM Tests - JDK ${{matrix.java.name}}"
path: |
**/target/*-reports/TEST-*.xml
target/build-report.json
LICENSE
retention-days: 7
```
Note that the name of the artifact is important:
- It must start with `build-reports-`
- Then include the exact job name - the job name must be used, not the job id (the job id is not available in the payloads so we cannot map reports to jobs with the job id)

The artifact may never be empty so include a file that will always be present (e.g. the `LICENSE` file).

In the unfortunate case when the paths of the files you want to upload contain characters not supported by `upload-artifact`,
you can create an archive and push the archive instead:

```yaml
- name: Prepare build reports archive
if: always()
run: |
7z a -tzip build-reports.zip -r \
'**/target/*-reports/TEST-*.xml' \
'target/build-report.json' \
'target/gradle-build-scan-url.txt' \
LICENSE.txt
- name: Upload build reports
uses: actions/upload-artifact@v4
if: always()
with:
name: "build-reports-JVM Tests - JDK ${{matrix.java.name}}"
path: |
build-reports.zip
retention-days: 7
```

The Build Reporter will automatically unarchive the reports before analyzing them.

## Using the GitHub Action

You might not have the ability to set up a GitHub App,
or you might want to also provide build reports on forks.

For these use cases, we also offer a GitHub Action that can be used directly in your workflows.

See [https://github.com/quarkusio/action-build-reporter/](Action Build Reporter) for more information.

## Releasing

```
Expand Down

0 comments on commit a09d259

Please sign in to comment.