Rewrite hydra.rst to mention RunCommand hooks#104
Rewrite hydra.rst to mention RunCommand hooks#104antifuchs wants to merge 1 commit intocachix:masterfrom
Conversation
This provides an alternative configuration for hydra jobs pushing to cachix.
|
What's the benefit over the hooks? |
|
The benefit is that the system building the derivation doesn't have to be modified to upload everything to cachix and that you can choose what jobs to do the cachix-uploading for (this machine for instance also builds a bunch of docker images from nix that definitely shouldn't be cached). |
|
Is there any reason to support the post-build-hook then? If not, we should just document the runCommand option. |
|
I think that might work - but there are some things I'm not sure about re. this vs. the post-build hook (I'm a hydra newbie and am running it with only one build host, the one that the hydra service runs on): mainly, when one job is done, is it the same node that runs the post-build script? I'm not sure: that would be effectively guaranteed with the hook. |
| runtimeInputs = [pkgs.jq pkgs.cachix]; | ||
| text = '' | ||
| set -xeu | ||
| jq -r '.outputs[].path' "$HYDRA_JSON" | xargs cachix --config ${config.age.secrets.hydra-ci.path} push mycache |
There was a problem hiding this comment.
We'd need to specify here how to create the config, and mention it's advised to use some secrets manager like age.
|
I think it's fine to just advertise the runcommand, so that the users don't need to decide between two options. It seems like the main server does the pushing in this case, which is fine. |
This provides an alternative configuration for hydra jobs pushing to cachix (namely, the configuration that I ended up using (-:).
Hope this is useful to somebody else, too.