Commit graph

714 commits

Author SHA1 Message Date
Rob Vermaas 268f273a3e Add value and dependency fields to eval json output. 2014-05-08 17:08:31 +02:00
Eelco Dolstra da73eb5f8a Include dependency column in JSON output 2014-05-08 16:36:15 +02:00
Rob Vermaas 1c92d760fa Merge pull request #161 from thoughtpolice/coverity
hydra: add Coverity Scan plugin
2014-05-03 17:46:35 +02:00
Austin Seipp 4166974657 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 <coverityscan> section to your Hydra config, including the
access token, project name, and email, and a regex specifying jobs to
upload:

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

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/...-cov-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.)

This file will be found in the store, and uploaded to the service
directly using your access credentials. Note the exact extension: don't
use .tar.xz, only use .xz specifically.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
2014-05-02 14:15:25 -05:00
Eelco Dolstra 1306291c6c Handle utf-8 properly
Fixes errors like:

  Caught exception in engine "Wide character in syswrite at /nix/store/498lwsrn5kkdh1q8kn3vcpd3457w6m7a-hydra-perl-deps/lib/perl5/site_perl/5.16.3/Starman/Server.pm line 547."

Note that these errors didn't happen if the database encoding was set
to SQL_ASCII (which was the case for hydra.nixos.org, explaining why
it didn't get these errors). However, now the encoding must be
UTF8. To change it, do:

  update pg_database set encoding = pg_char_to_encoding('UTF8') where datname = 'hydra';
2014-05-01 16:33:25 +02:00
Eelco Dolstra 67c79a16a8 Remove unnecessary join against releases table
This gets rid of the warning:

  DBIx::Class::Storage::DBI::select_single(): Query returned more than one row.  SQL that returns multiple rows is DEPRECATED for ->find and ->single at /home/eelco/Dev/hydra/src/script/../lib/Hydra/Controller/Project.pm line 15
2014-05-01 13:03:34 +02:00
Eelco Dolstra 6c6ce7a781 Fix cloning jobsets 2014-04-30 09:26:53 +02:00
Eelco Dolstra 4d9edd0ca8 Also redirect /job requests that refer to a renamed jobset 2014-04-24 11:05:16 +02:00
Eelco Dolstra 23416f9960 Do a permanent redirect 2014-04-24 10:52:46 +02:00
Eelco Dolstra affec8881d Remove support for views
They're replaced by aggregates, which are declarative, faster, and
have a better interface.
2014-04-23 23:22:44 +02:00
Eelco Dolstra 5e0d10a392 When renaming a jobset, add a redirect from the old name 2014-04-23 23:15:22 +02:00
Eelco Dolstra be63c50560 Show whether a job still exists
In the dashboard and on the job page, indicate whether the job appears
in the latest jobset eval. That way, the user gets some indication if
a job has accidentally disappeared (e.g. due to an evaluation error).
2014-04-08 18:50:37 +02:00
Ludovic Courtès ccdb6f2b23 Honor $NIX_STORE_DIR. 2014-02-28 14:09:12 +01:00
Your Name f409d2b4f6 Allow notify option to be set for hipchat notification. (https://www.hipchat.com/docs/api/method/rooms/message) 2014-02-28 09:27:33 +00:00
Shea Levy b29d7b1091 Only email responsible authors when the build has changed 2014-02-26 11:05:46 -05:00
Eelco Dolstra 8dcef7702f Add jobset/job menus on buid log pages 2014-02-26 11:49:28 +01:00
Eelco Dolstra 66b8c1a9e0 Return 410 Gone (rather than 500) if an output is no longer available 2014-02-26 11:38:02 +01:00
Rob Vermaas 6327edd63f Add a convenient way to get logs of a path/drv. Requested by phreedom. 2014-02-19 10:21:59 +00:00
Hydra d4d9896f9f Re-add the history tab (store size and build time), now as lazy-loaded tab on build page. 2014-01-28 11:55:19 +01:00
Rob Vermaas ac177d0984 Add nixexprpath/nixexprinput to GET of jobset (API). 2014-01-23 12:44:02 +01:00
Eelco Dolstra 492fe121ea Jobset eval page: Fix handling of aborted/cancelled builds
The fix in 85d51074 was not quite right.
2014-01-15 16:06:47 +01:00
Eelco Dolstra cad2c07a35 Fix broken redirects 2014-01-14 18:17:33 +01:00
Eelco Dolstra 6572869596 clear-queue-non-current: Work around PostgreSQL query optimizer stupidity 2014-01-14 18:14:10 +01:00
Rob Vermaas bd7b6fc401 Allow Hydra to run as a private instance by requiring a login.
Use the following in your hydra.conf to make your instance a
private Hydra instance (public is the default):

  private 1

Currently, this will not allow you to use the API, channels
and the binary cache when running in private mode. We will add
solutions for these functionalities later.
2014-01-10 11:04:28 +01:00
Rob Vermaas 3e1a98668f Allow configuring a set of domains to allow logins from Persona.
E.g. add the following to only allow Persona logins from email.com and gmail.com email addresses.

  persona_allowed_domains email.com,gmail.com
2014-01-09 13:31:02 +01:00
Eelco Dolstra a598fe7e81 Allow Hydra's binary cache to be signed
This requires adding the following to hydra.conf:

  binary_cache_key_name = <key-name>
  binary_cache_private_key_file = <path-to-private-key>

e.g.

  binary_cache_key_name = hydra.nixos.org-1
  binary_cache_private_key_file = /home/hydra/cache-key.sec
2014-01-08 15:19:17 +01:00
Shea Levy de26b55afe User.pm: Handle params from JSON properly
Signed-off-by: Shea Levy <shea@shealevy.com>
2013-12-12 09:38:57 -05:00
Rob Vermaas f25f8dbfa3 Higher timeout for prefetching bazaar inputs. 2013-12-11 17:34:45 +01:00
Eelco Dolstra dd4e57fb0c Allow passing a specific build as an input
Fixes #62.
2013-11-11 21:36:26 +00:00
Eelco Dolstra 8f104396ec Support passing a jobset evaluation as an input
All successful, non-garbage-collected builds in the evaluation are
passed in a attribute set.  So if you declare a Hydra input named
‘foo’ of type ‘eval’, you get a set with members ‘foo.<jobname>’.  For
instance, if you passed a Nixpkgs eval as an input named ‘nixpkgs’,
then you could get the Firefox build for x86_64-linux as
‘nixpkgs.firefox.x86_64-linux’.

Inputs of type ‘eval’ can be specified in three ways:

* As the number of the evaluation.

* As a jobset identifier (‘<project>:<jobset>’), which will yield the
  latest finished evaluation of that jobset.  Note that there is no
  guarantee that any job in that evaluation has succeeded, so it might
  not be very useful.

* As a job identifier (‘<project>:<jobset>:<job>’), which will yield
  the latest finished evaluation of that jobset in which <job>
  succeeded.  In conjunction with aggregate jobs, this allows you to
  make sure that the evaluation contains the desired builds.
2013-11-11 21:17:22 +00:00
Eelco Dolstra 4fb3d67f49 Make /login give a proper JSON response again 2013-11-06 16:12:07 +01:00
Eelco Dolstra 60e7e4fbe9 Remove obsolete/broken timeline feature 2013-11-06 15:20:30 +01:00
Eelco Dolstra 33f01da507 Fix hydra_logo setting 2013-11-06 15:10:26 +01:00
Eelco Dolstra 3c45992182 Make the logo configurable via hydra.conf 2013-11-06 14:40:30 +01:00
Eelco Dolstra b44baf3746 Add a flag to enable Persona support
It's disabled by default.  To enable, add the following to hydra.conf:

  enable_persona = 1
2013-11-06 14:38:36 +01:00
Eelco Dolstra 63100b0ee8 Merge branch 'master' into persona 2013-11-06 12:35:36 +01:00
Shea Levy f1c187198c Stupid capitalization scheme
Signed-off-by: Shea Levy <shea@shealevy.com>
2013-11-05 12:39:55 -05:00
Shea Levy 2e1c07c5f7 Argh
ALWAYS RUN THE TESTS

Signed-off-by: Shea Levy <shea@shealevy.com>
2013-11-05 12:31:36 -05:00
Eelco Dolstra ae85d2df23 Add a "My jobsets" tab to the dashboard 2013-11-05 16:05:29 +01:00
Shea Levy d5574230e4 typo
Signed-off-by: Shea Levy <shea@shealevy.com>
2013-11-05 09:57:15 -05:00
Shea Levy 217ba725a3 Restore accidentally-removed fields to the Builds API
Signed-off-by: Shea Levy <shea@shealevy.com>
2013-11-05 09:43:32 -05:00
Shea Levy 385ceaff4d Show buildinput and buildproduct information in the Builds API
Signed-off-by: Shea Levy <shea@shealevy.com>
2013-11-05 09:42:05 -05:00
Eelco Dolstra 589271bd72 In the "My jobs" tab, ignore disabled projects/jobsets 2013-11-05 14:53:52 +01:00
Eelco Dolstra fc827a003a Be paranoid about the Persona email address 2013-11-05 14:40:40 +01:00
Eelco Dolstra b53bd868fb Add a "My jobs" tab to the dashboard
It shows all current jobs of which the user is a maintainer.
2013-11-05 14:35:49 +01:00
Eelco Dolstra 3c981bed02 Slight cleanup in the Persona sign in code 2013-11-05 14:10:20 +01:00
Eelco Dolstra bdd6e99fbd Clean up user editing 2013-11-05 14:02:04 +01:00
Eelco Dolstra bd927eba66 Make sign in a modal dialog box rather than a separate page 2013-11-05 13:13:02 +01:00
Eelco Dolstra 299ac07cbc Re-enable adding new users via the web interface
Also unify user creation and user editing.
2013-11-05 12:41:10 +01:00
Eelco Dolstra 36c961a376 Store the account type ("hydra" or "persona") explicitly in the database 2013-11-05 11:46:05 +01:00