Skip to content

MiniHarinn/hydra-banner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

❄️✨ Hydra Banner

Motivation: I want a way to quickly glance at Hydra build status directly from PRs and Issues (since I found that a lot of people usually paste Hydra links, and that's another step I need to take before getting to the Hydra build report). So, here it is, directly in the PR/Issue!

I created this project to improve my own (and hopefully others) workflows and PR/Issue quality in Nixpkgs. Any usage or adoption of the project would make me happy!

Disclaimer

The hosted instance (hydra-banner.harinn.dev) aggressively caches generated SVGs to reduce load on Hydra and keep it focused on build jobs (first-time generation always reaches Hydra). Note that this may cause banners for unfinished builds to update with a delay.

  • 1 month for finished builds (HTTP 200)
  • 4 hours for unfinished builds (HTTP 202)
  • 2 hours for Hydra 50x errors (HTTP 502)

Hydra maintainers -- if this service is overloading Hydra (User-Agent: hydra-banner/<version> (+https://github.com/MiniHarinn/hydra-banner)) please reach out to me at matrix:@harinn:matrix.org

Usage

API Endpoint:

https://hydra-banner.harinn.dev/build/<build-id>

Embed in a PR or issue:

# Not clickable
![](https://hydra-banner.harinn.dev/build/<build-id>) 

# Click to nav to Hydra
[![](https://hydra-banner.harinn.dev/build/<build-id>)](https://hydra.nixos.org/build/<build-id>) 

Generate markdown for Hydra build(s):

nix run github:MiniHarinn/hydra-banner#getmd <build-id|url> [build-id|url]...

Example:

nix run github:MiniHarinn/hydra-banner#getmd <build-id-1> <build-id-2> <build-id-3>

Output (ready to paste into a PR or issue):

[![](https://hydra-banner.harinn.dev/build/<build-id-1>)](https://hydra.nixos.org/build/<build-id-1>)
[![](https://hydra-banner.harinn.dev/build/<build-id-2>)](https://hydra.nixos.org/build/<build-id-2>)
[![](https://hydra-banner.harinn.dev/build/<build-id-3>)](https://hydra.nixos.org/build/<build-id-3>)

Grab latest build (glb):

Don't have a build ID? glb (grab-latest-build) looks up the latest Hydra build for a nixpkgs attribute and generates the markdown directly.

nix run github:MiniHarinn/hydra-banner#glb <attr> [attr]...

Example:

nix run github:MiniHarinn/hydra-banner#glb hello ripgrep

Output (ready to paste into a PR or issue):

[![](https://hydra-banner.harinn.dev/build/<build-id-1>)](https://hydra.nixos.org/build/<build-id-1>)
[![](https://hydra-banner.harinn.dev/build/<build-id-2>)](https://hydra.nixos.org/build/<build-id-2>)

Example Output

Related Projects

Contributions

Issues and PRs are welcome. I just want to make the workflow around Hydra better for everyone in Nixpkgs!


Made with ❤️ by @MiniHarinn and his passion in Nix

About

Turn Hydra build job status into a PR/issue-able banner.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors