Online view of HTML artifacts for public projects
Many projects use CI for creating HTML/XML reports, for example in JUnit format. The Java Community is a clear example of that.
We want to support the online rendering and visualization of HTML artifacts that is currently unavailable on the artifacts browser because of security issues. Reports in other format (XML/JUnit) could be automatically translated into HTML by the proper tools, so they can be rendered too.
You can currently use GitLab Pages for this, but there are a few issues with this:
- If your build already produces pages, then you have nowhere to put your test reports
- If your project is not public, and you don't want your test reports to be public, then GitLab Pages will not work (they are always public)
- From a usability perspective, this is not quite good enough. The usability should compare to how gitlab handles code coverage, which does not require GitLab Pages
- But the biggest issue is that Pages only has one version of a published page, but you need to see test results for topic branches, old pipelines, etc.
Using a separate domain in order to guarantee security, artifacts are published by CI and served online so they can be consumed directly from within the browser.
This iteration just focuses on the MVP, so there are just a subset of the features that could be implemented:
- support for online display of HTML artifacts
- automatic publishing from CI (similar to Pages)
- support for public projects only
- no authentication for user access
- need for a separate domain (neither the same as the main instance of GitLab, nor Pages one)
Since we probably can't use an iframe or similar to display the HTML artifacts in the blob view, we'll need to open the HTML file separately. For this first iteration:
- Change the link for HTML artifacts to open the HTML file in a new window/tab (instead of linking to the blob view)
- Add a fa-external-link icon next to the HTML file name
- Show the following tooltip next to the filename when hovering the whole table row:
Opens in a new window
Links / references
- Master meta issue: Improvements for Java language in CI (#33943)
- Future iteration: Extend online view of HTML artifacts to private projects (#10982)
As many projects relies on GitLab for automatic testing, developers also need to access the test results in order to fully understand the feedback. With GitLab 9.5 we introduce the online browsing of HTML files created by pipelines, so your reports will be really simple to access directly from your browser.