Commit graph

580 commits

Author SHA1 Message Date
Eelco Dolstra a57957df84 Handle job aliases in AggregateConstituents
Aggregate constituents are derivations.  However there can be multiple
builds in an evaluation that have the same derivation, i.e. they can
alias each other (e.g. "emacs", "emacs24" and "emacs24Packages.emacs"
in Nixpkgs).  Previously we picked a build arbitrarily for the
AggregateConstituents table.  Now we pick the one with the shortest
name (e.g. "emacs").
2013-08-27 11:48:02 +02:00
Rob Vermaas a98075f386 HipChat notification: do not include latest commits of all inputs in 'who-broke-the-build' list. Use only committers from inputs that have actually changed since previous build. 2013-08-26 11:06:10 +00:00
Eelco Dolstra 02cba75610 Add an action to download a specific output of a build as a .nar.bz2
E.g. http://hydra/build/3515983/output/out downloads the output named
"out" as a bzip2-compressed NAR.
2013-08-21 14:30:38 +02:00
Eelco Dolstra edb88ef452 Remove unused ActiveJobs source 2013-08-20 15:22:46 +02:00
Eelco Dolstra 6264995198 Remove the jobs status page
The per-system presentation doesn't make much sense any more given
issue #60.  It should be replaced by (say) a grid showing each job per
evaluation.
2013-08-16 17:16:15 +02:00
Eelco Dolstra e54c361a95 Remove per-platform links from the job page
Having different builds within a job is obsolete (issue #60), one
should have different job per platform (e.g. build.x86_64-linux).
2013-08-16 16:39:42 +02:00
Eelco Dolstra a9c6f522e6 clear_queue_non_current: Don't use isCurrent 2013-08-16 16:38:09 +02:00
Eelco Dolstra 72a0fa6ec5 Sort constituents by job name 2013-08-15 03:28:21 +02:00
Eelco Dolstra d92d83a82a Fix broken redirect when editing a release 2013-08-15 02:57:36 +02:00
Eelco Dolstra 1776d9118f Rename aggregate members to constituents 2013-08-15 02:33:10 +02:00
Eelco Dolstra 81322de94e Show aggregate members 2013-08-15 00:30:19 +02:00
Eelco Dolstra d58142b3f0 Store aggregate members in the database
For presentation purposes, we need to know what builds are part of an
aggregate build.  So at evaluation time, look at the "members"
attribute, find the corresponding builds in the eval, and create a
mapping in the AggregateMembers table.
2013-08-14 01:59:29 +02:00
Eelco Dolstra c27f4bbaf5 Add a redirect from an eval to a named member
E.g. /eval/798867/job/tarball redirects to the build with job name
"tarball".
2013-08-13 01:56:45 +02:00
Eelco Dolstra a25ea193f7 Add a /eval action to /build to go from a build to the latest finished eval 2013-08-13 01:43:50 +02:00
Eelco Dolstra 4792256e43 Add some more fields to the JSON output of /build 2013-08-12 22:57:53 +02:00
Eelco Dolstra bef263c930 Add a ‘latest-finished’ action
It redirects to the latest successful build from a finished
evaluation.  This is mostly useful for the Nixpkgs/NixOS mirroring
script, which need the latest finished evaluation in which some
aggregate job (such as ‘tested’ in NixOS) succeeded.
2013-08-12 22:17:04 +02:00
Eelco Dolstra 452c8e36d1 Materialize the number of finished builds
The NrBuilds table tracks the value of ‘select count(*) from Builds
where finished = 0’, keeping it up to date via a trigger.  This is
necessary to make the /all page fast, since otherwise it needs to do a
sequential scan on the Builds table.
2013-08-12 20:19:10 +02:00
Eelco Dolstra 182f725612 Don't pass an undefined input 2013-08-12 18:15:11 +02:00
Eelco Dolstra d96df42c03 GitInput.pm: Don't do a chdir to the Git clone
Doing a chdir in the parent is evil.  For instance, we had Hydra core
dumps ending up in the cloned directory.  Therefore, the function
‘run’ allows doing a chdir in the child.  The function ‘grab’ returns
the child's stdout and throws an exception if the child fails.
2013-08-12 17:46:26 +02:00
Rob Vermaas 90eedcf256 HipChat notification: add support for Mercurial inputs for determining who might have broken the build. 2013-08-07 08:53:32 +00:00
Shea Levy 96e987bbfa Use inputTypes from plugins to determine valid input types
Signed-off-by: Shea Levy <shea@shealevy.com>
2013-07-29 17:42:49 -04:00
Shea Levy 687ca429c3 Pass project and jobset to fetchInput
Signed-off-by: Shea Levy <shea@shealevy.com>
2013-07-29 15:33:22 -04:00
Shea Levy f231c23b75 Only serialize JSON and HTML, not the C::C::REST defaults
Signed-off-by: Shea Levy <shea@shealevy.com>
2013-07-26 14:25:25 -04:00
Shea Levy eab13d8736 ToJSON is automatically called recursively
Signed-off-by: Shea Levy <shea@shealevy.com>
2013-07-26 13:54:07 -04:00
Shea Levy d6b23272e3 Don't try to serialize if there's nothing to serialize
Signed-off-by: Shea Levy <shea@shealevy.com>
2013-07-26 12:04:27 -04:00
Shea Levy f7bcf9fc19 The field is actually enabled, not disabled
Signed-off-by: Shea Levy <shea@shealevy.com>
2013-07-25 17:59:13 -04:00
Shea Levy 1404d33005 Show when a Project's jobsets are disabled
Signed-off-by: Shea Levy <shea@shealevy.com>
2013-07-25 17:48:28 -04:00
Rob Vermaas 513c030268 Do not use local clone for Bazaar inputs. 2013-07-22 20:42:17 +02:00
Eelco Dolstra 6574d125c7 Get rid of a warning in the HipChat plugin 2013-07-19 14:43:04 +02:00
Ludovic Courtès 2d5e06918b Hydra::View::Plain: Explicitly set the response body.
This fixes a bug with Catalyst 1.39 whereby a raw hash table would
erroneously be returned for /nix-cache-info.
2013-07-12 16:53:48 +02:00
Ludovic Courtès 438d7f7c5c Reply 404 for requests for non-existent .narinfo. 2013-07-12 16:52:40 +02:00
Eelco Dolstra d071bbfb28 Fix Hipchat notification 2013-07-12 15:04:13 +02:00
Shea Levy 7a0f80f016 Include the email override list in the Jobset serialization
Signed-off-by: Shea Levy <shea@shealevy.com>
2013-07-11 11:01:36 -04:00
Shea Levy efd011fbc3 Revert "Don't call buildFinished after we already know it failed"
I don't understand perl strings.

This reverts commit b2f6be9686.

Signed-off-by: Shea Levy <shea@shealevy.com>
2013-07-08 14:30:46 -04:00
Shea Levy b2f6be9686 Don't call buildFinished after we already know it failed
Signed-off-by: Shea Levy <shea@shealevy.com>
2013-07-08 13:52:51 -04:00
Shea Levy 166d56088f Call buildFinished when a cached build is added
Signed-off-by: Shea Levy <shea@shealevy.com>
2013-07-08 13:35:34 -04:00
Shea Levy b46f2134e0 Revert "Emable overriding the email template."
This doesn't work as planned, will re-work.

This reverts commit 304f8a5714.
2013-07-05 18:10:50 -04:00
Shea Levy a168f43515 Revert "Handle HYDRA_EMAIL_TEMPLATES that are paths"
This doesn't work as planned, will re-work.

This reverts commit d2ce7747a0.
2013-07-05 18:10:21 -04:00
Shea Levy d2ce7747a0 Handle HYDRA_EMAIL_TEMPLATES that are paths
Signed-off-by: Shea Levy <shea@shealevy.com>
2013-07-05 17:22:51 -04:00
Shea Levy 304f8a5714 Emable overriding the email template.
The HYDRA_EMAIL_TEMPLATE env var can be set to any value understood by
https://metacpan.org/module/Template#process-template-vars-output-options
as the $template argument.

Signed-off-by: Shea Levy <shea@shealevy.com>
2013-07-05 16:29:09 -04:00
Shea Levy be3ca0dd84 Fix jobset update
Signed-off-by: Shea Levy <shea@shealevy.com>
2013-07-05 14:44:29 -04:00
Shea Levy 93a14ccf32 Check if we want to send email for a build before iterating through its users
Signed-off-by: Shea Levy <shea@shealevy.com>
2013-07-05 14:06:10 -04:00
Shea Levy 002ac9ef63 Merge in the first bits of the API work
The catalyst-action-rest branch from shlevy/hydra was an exploration of
using Catalyst::Action::REST to create a JSON API for hydra. This commit
merges in the best bits from that experiment, with the goal that further
API endpoints can be added incrementally.

In addition to migrating more endpoints, there is potential for
improvement in what's already been done:
* The web interface can be updated to use the same non-GET endpoints as
  the JSON interface (using x-tunneled-method) instead of having a
  separate endpoint
* The web rendering should use the $c->stash->{resource} data structure
  where applicable rather than putting the same data in two places in
  the stash
* Which columns to render for each endpoint is a completely debatable
  question
* Hydra::Component::ToJSON should turn has_many relations that have
  strings as their primary keys into objects instead of arrays

Fixes NixOS/hydra#98

Signed-off-by: Shea Levy <shea@shealevy.com>
2013-07-02 14:00:46 -04:00
Eelco Dolstra d18fc4fc38 Include names of committers in HipChat notifications
HipChat notification messages now say which committers were
responsible, e.g.

  Job patchelf:trunk:tarball: Failed, probably due to 2 commits by Eelco Dolstra
2013-07-02 13:54:18 +02:00
Eelco Dolstra fe030331b5 Revert "Don't compress already-compressed files."
This reverts commit 190bffd846.
2013-07-01 18:46:18 +02:00
Eelco Dolstra 11414b0447 Revert "Doh"
This reverts commit f1f938512d.
2013-07-01 18:46:14 +02:00
Rob Vermaas f1f938512d Doh 2013-07-01 18:12:33 +02:00
Rob Vermaas 9d7c14b342 Merge pull request #103 from civodul/nar-uncompressed
Don't compress already-compressed files.
2013-07-01 08:16:51 -07:00
Eelco Dolstra 9939ddf22c Add a plugin for HipChat notification
This plugin sends notification of build failure or success to a
HipChat room, if the status differs from the last build.

The plugin can be configured by adding one or more of these stanzas to
hydra.conf:

  <hipchat>
    jobs = (patchelf|nixops):.*:.*
    room = 1234
    token = 39ab2198fe...
  </hipchat>

Here "jobs" is a regular expression against which the fully qualified
job name of the build is matched (so for instance
"nixops:master:tarball" will match the stanza above).
2013-06-27 18:56:31 +02:00
Eelco Dolstra 698d6eac89 Eliminate duplicate getPreviousBuild functions
And move some stuff into CatalystUtils for use by other plugins.
2013-06-27 18:08:00 +02:00