this post was submitted on 22 Jun 2024
9 points (90.9% liked)

Open Source

31749 readers
167 users here now

All about open source! Feel free to ask questions, and share news, and interesting stuff!

Useful Links

Rules

Related Communities

Community icon from opensource.org, but we are not affiliated with them.

founded 5 years ago
MODERATORS
 

I want to showcase the project I have been working on for the last weeks. GitHub and Gitea/Forgejo allow you to upload files and directories created during a continuous integration run (Artifacts). These can be downloaded as zip files. However there is no simple way to view individual files of an artifact.

That's why I developed a small web application that allows you to view the artifacts of any CI run in your web browser. This allows you to quickly look at test reports or preview your web projects.

I am hosting a public instance with support for GitHub and Codeberg under https://av.thetadev.de/.

Features

  • ๐Ÿ“ฆ Quickly view CI artifacts in your browser without messing with zip files
  • ๐Ÿ“‚ File listing for directories without index page
  • ๐Ÿ  Every artifact has a unique subdomain to support pages with absolute paths
  • ๐ŸŒŽ Full SPA support with 200.html and 404.html fallback pages
  • ๐Ÿ‘๏ธ Viewer for Markdown, syntax-highlighted code and JUnit test reports
  • ๐Ÿต Greasemonkey userscript to automatically add a "View artifact" button to GitHub/Gitea/Forgejo
  • ๐Ÿฆ€ Fast and efficient, only extracts files from zip archive if the client does not support gzip
  • ๐Ÿ”— Automatically creates pull request comments with links to all build artifacts

Examples

Here are some artifacts to try:

SveltePress documentation site: https://cb--thetadev--artifactview--28-2.av.thetadev.de/

A bunch of test files: https://cb--thetadev--artifactview--28-1.av.thetadev.de/

Artifactview's own test report: https://cb--thetadev--artifactview--65-1.av.thetadev.de/junit.xml?viewer=1

Automatically created pull request comment: https://codeberg.org/ThetaDev/artifactview/pulls/2

top 5 comments
sorted by: hot top controversial new old
[โ€“] Daeraxa@lemmy.ml 4 points 6 months ago (1 children)

This is really cool and something I've been missing since we kind of got forced off our original CI platform (they changed their free tier and it would have been financially prohibitive) and moved to GH runners.

Is there a limit to the size? I notice that your example instance (and the default value) of file size is set to 100MB, is there a maximum size if you were to self host it or is it technically unlimited? Our CI artifacts tend to be around 700-800MB.

[โ€“] ThetaDev@lemm.ee 2 points 6 months ago (2 children)

Technically unlimited, but you obviously need to have enough storage to cache the zip files (and RAM to cache the file index). My server is very small, so I needed to set the limit low.

[โ€“] Daeraxa@lemmy.ml 2 points 6 months ago

Totally understand the limits on your server, I know why you would have it set that way hence why I was wondering about the limits if self hosting. Definitely going to have a play with this.

[โ€“] mormund@feddit.de 2 points 6 months ago (1 children)

Does GitHub support range requests for artifacts? With that you could read the file index without downloading and caching the entire zip

[โ€“] ThetaDev@lemm.ee 2 points 6 months ago* (last edited 6 months ago)

It does (they of course use their Azure Blob storage under the hood). Forgejo however does not (even though it supports it for releases and packages and Golang has this in their standard library).

I'll keep the idea in mind.