Hydra: Difference between revisions
imported from old wiki |
m fix nix code block indentation and syntax highlighting for shell commands |
||
| (8 intermediate revisions by 6 users not shown) | |||
| Line 1: | Line 1: | ||
<languages /> | <languages /> | ||
<translate> | <translate> | ||
<!--T:73--> | |||
{{note| Hydra is intended to be used by Nix/NixOS package developers; it is not needed to simply use NixOS.}} | |||
<!--T:1--> | <!--T:1--> | ||
Hydra is a tool for continuous integration testing and software release that uses a purely functional language to describe build jobs and their dependencies. Continuous integration is a simple technique to improve the quality of the software development process. An automated system continuously or periodically checks out the source code of a project, builds it, runs tests, and produces reports for the developers. Thus, various errors that might accidentally be committed into the code base are automatically caught. | Hydra is a tool for continuous integration testing and software release that uses a purely functional language to describe build jobs and their dependencies. Continuous integration is a simple technique to improve the quality of the software development process. An automated system continuously or periodically checks out the source code of a project, builds it, runs tests, and produces reports for the developers. Thus, various errors that might accidentally be committed into the code base are automatically caught. | ||
<!--T:2--> | <!--T:2--> | ||
The official Hydra servers provide pre-built binary packages to speed up the update time for | The official Hydra servers provide pre-built binary packages to speed up the update time for Nixpkgs: Users do not have to compile them on their own computers. | ||
<!--T:3--> | <!--T:3--> | ||
| Line 16: | Line 19: | ||
</translate> | </translate> | ||
< | <syntaxhighlight lang="nix"> | ||
services.hydra = { | |||
enable = true; | |||
hydraURL = "http://localhost:3000"; # externally visible URL | |||
notificationSender = "hydra@localhost"; # e-mail of Hydra service | |||
# a standalone Hydra will require you to unset the buildMachinesFiles list to avoid using a nonexistant /etc/nix/machines | |||
buildMachinesFiles = []; | |||
# you will probably also want this, otherwise *everything* will be built from scratch | |||
useSubstitutes = true; | |||
}; | |||
</ | </syntaxhighlight> | ||
<translate> | <translate> | ||
<!--T:36--> | <!--T:36--> | ||
The module will automatically enable postgresql if you do not change the <code>services.hydra.dbi</code> option. Database layout will be created automatically by the Hydra service, however keep in mind that some state will be stored in the database and a complete stateless configuration is currently not possible - do your backups. | The module will automatically enable [[PostgreSQL|postgresql]] if you do not change the <code>services.hydra.dbi</code> option. Database layout will be created automatically by the Hydra service, however keep in mind that some state will be stored in the database and a complete stateless configuration is currently not possible - do your backups. | ||
<!--T:37--> | <!--T:37--> | ||
| Line 41: | Line 44: | ||
</translate> | </translate> | ||
<syntaxHighlight lang= | <syntaxHighlight lang=console> | ||
$ su - hydra | |||
$ hydra-create-user alice --full-name 'Alice Q. User' \ | $ hydra-create-user alice --full-name 'Alice Q. User' \ | ||
--email-address 'alice@example.org' --password-prompt --role admin | --email-address 'alice@example.org' --password-prompt --role admin | ||
| Line 77: | Line 80: | ||
<!--T:10--> | <!--T:10--> | ||
* Type: Flake | * Type: [[Flakes|Flake]] | ||
<!--T:40--> | <!--T:40--> | ||