Configure CD with Hydra


I’ve been fiddling with Hydra and was wondering if there was a way to configure Continuous Deployment based on the most recent successful build or similar.

My current prcoess consists of a nix-serve with Hydra and I pull from cache on the deployment whennI want to update, and I was wondering if there’s a Hydra integrated way to do CD, or to notify a CD service when a build completes successfully?

Thank you all in advance

Yes, you can make hydra do impure stuff post build via dynamic runcommands: hydra/ at 5c90edd19f1787141ae3d9751f567b4df11fc0fa · NixOS/hydra · GitHub

Oh wonderful! I didn’t know the runCommands were impure, that’s good to know!

Just to avoid misunderstandings: the RunCommand feature in Hydra doesn’t use pkgs.runCommand for that. The latter results in a derivation and thus built in a sandboxed (i.e. pure) environment.