Creating and Managing Projects Once Hydra is installed and running, the next step is to add projects to the build farm. We follow the example of the Patchelf project, a software tool written in C and using the GNU Build System (GNU Autoconf and GNU Automake). Log in to the web interface of your Hydra installation using the user name and password you inserted in the database (by default, Hydra's web server listens on localhost:3000). Then follow the "Create Project" link to create a new project.
Project Information A project definition consists of some general information and a set of job sets. The general information identifies a project, its owner, and current state of activity. Here's what we fill in for the patchelf project: Identifier: patchelf The identifier is the identity of the project. It is used in URLs and in the names of build results. The identifier should be a unique name (it is the primary database key for the project table in the database). If you try to create a project with an already existing identifier you'd get an error message such as: I'm very sorry, but an error occurred: DBIx::Class::ResultSet::create(): DBI Exception: DBD::SQLite::st execute failed: column name is not unique(19) at dbdimp.c line 402 So try to create the project after entering just the general information to figure out if you have chosen a unique name. Job sets can be added once the project has been created. Display name: Patchelf The display name is used in menus. Description: A tool for modifying ELF binaries The description is used as short documentation of the nature of the project. Owner: eelco The owner of a project can create and edit job sets. Enabled: Yes Only if the project is enabled are builds performed. Once created there should be an entry for the project in the sidebar. Go to the project page for the Patchelf project.
Job Sets A project can consist of multiple job sets (hereafter jobsets), separate tasks that can be built separately, but may depend on each other (without cyclic dependencies, of course). Go to the Edit page of the Patchelf project and "Add a new jobset" by providing the following "Information": Identifier: trunk Description: Trunk Nix expression: release.nix in input patchelfSrc This states that in order to build the trunk jobset, the Nix expression in the file release.nix, which can be obtained from input patchelfSrc, should be evaluated. (We'll have a look at release.nix later.) To realize a job we probably need a number of inputs, which can be declared in the table below. As many inputs as required can be added. For patchelf we declare the following inputs. patchelfSrc 'Subversion checkout' https://svn.nixos.org/repos/nix/patchelf/trunk nixpkgs 'Subversion checkout' https://svn.nixos.org/repos/nix/nixpkgs/trunk officialRelease Boolean false system String value "i686-linux"
Release Set there must be one primary job check the radio button of exactly one job https://svn.nixos.org/repos/nix/nixpkgs/trunk
Building Jobs
<filename>release.nix</filename> - Voorbeelden van Nix expressies voor Hydra: https://svn.nixos.org/repos/nix/patchelf/trunk/release.nix https://svn.nixos.org/repos/nix/nix/trunk/release.nix https://svn.nixos.org/repos/nix/hydra/trunk/release.nix
Building on the Command Line Overigens zijn die helemaal niet Hydra-specifiek, je kunt ze gewoon vanaf de command line bouwen, bijv. als je een patchelf checkout hebt (met een nixpkgs checkout in ../nixpkgs): $ nix-build release.nix -A rpm_fedora10i386