-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rewrite hydra.rst to mention RunCommand hooks #104
base: master
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.