NixOS/hydra — pull request #161 by thoughtpolice (2014-05-02 19:19:55+00:00)
Title: hydra: add Coverity Scan plugin

This adds a Hydra plugin for users to submit their open source projects to the Coverity Scan system for analysis.

First, add a section to your Hydra config, including the access token, project name, and email, and a regex specifying jobs to upload:

project = testrix
jobs = foobar:.*:coverity.*
email = aseipp@pobox.com
token = ${builtins.readFile ./coverity-token}

This will upload the scan results for any job whose name matches 'coverity.*' in any jobset in the Hydra 'foobar' project, for the Coverity Scan project named 'testrix'.

Note that one upload will occur per job matched by the regular expression - so be careful with how many builds you upload.

The jobs which are matched by the jobs specification must have a file in their output path of the form:

$out/tarballs/...-coverity-int.(xz|lzma|zip|bz2|tgz)

The file must have the 'cov-int' directory produced by `cov-build` in the root.

(You can also output something into `$out/nix-support/hydra-build-products` for the Hydra UI.)

However, since NixOS/nixpkgs@76b05b163001a26807f3d2f52434b482777967c1, this can conveniently be done using `releaseTools.coverityAnalysis` (much like `coverageAnalysis`) in a completely automated way for you - all you'll have to do is add the above to your Hydra configuration.