Open jappeace opened 3 years ago
As a workaround I did this:
let
agent-revision = "https://github.com/hercules-ci/hercules-ci-agent/archive/7fc025e183f22a21360b550dc0d0e15a5c1a3122.tar.gz";
hercules-ci-agent = fetchTarball agent-revision;
in
{
agent = { pkgs, ... }: {
environment.etc.agent-version = {
text = agent-revision;
mode = "0440";
};
....
};
};
Next time I'll know what's running there.
I've since updated the modules to get revision information from various sources and put it in a user data field called "Labels".
Both Nixpkgs-based installations and Flake-based installations will show version metadata when you click the agent, leading to a new page.
You can add any TOML-serializable value to services.hercules-ci-agent.settings.labels
. This includes most of JSON.
Here's an example of the default label set by a flake.
In another discussion, it wasn't enough to show the version. I think future discussions would go faster if the git revision would be available on the status page. I mean this page:
In Haskell, it's quite easy to do with GitHash Although that does trash nix caching on every commit, which isn't ideal.