Commit graph

1394 commits

Author SHA1 Message Date
Eelco Dolstra b47d9814e3 Clear $HYDRA_CONFIG in the tests
Otherwise one might accidentally send out HipChat notifications when
running the tests...
2013-07-19 14:42:34 +02:00
Eelco Dolstra 659c829e88 Tweaks for nix-shell 2013-07-19 14:36:52 +02:00
Eelco Dolstra 7cd386894d Don't try to open the Nix DB from configure
Not sure how this ever worked before...
2013-07-19 10:57:40 +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 db3647aa15 Set the character set
Cherry-picked from the persona branch.
2013-07-12 15:04:13 +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 117ae78a45 32-bit qemu can only do 2047 MB
Signed-off-by: Shea Levy <shea@shealevy.com>
2013-07-03 16:42: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 7e11d01abf Remove tabs 2013-07-02 11:37:16 +02:00
Eelco Dolstra 663b6a747b release.nix: Get rid of the "system" argument 2013-07-01 19:37:14 +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
Eelco Dolstra c65f40e146 Add common.js to the tarball 2013-06-25 12:48:25 +02:00
Eelco Dolstra 611f402a70 Move common Javascript code into a separate file 2013-06-25 01:16:28 +02:00
Eelco Dolstra a5436be2ce After editing a project/jobset, redirect back to the config tab 2013-06-25 01:00:59 +02:00
Eelco Dolstra 68a03bc674 When a tab is selected, change the fragment id
And when a page is visited, active the tab identified by the fragment
id.  This allows linking to a specific tab.

Fixes #93.
2013-06-25 00:55:14 +02:00
Eelco Dolstra afc90b36db Don't print to stdout 2013-06-24 22:22:43 +00:00
Ludovic Courtès 190bffd846 Don't compress already-compressed files.
Fixes <https://github.com/NixOS/hydra/issues/102>.
2013-06-23 15:23:16 +02:00
Eelco Dolstra 51f0185797 Allow _ in release names 2013-06-18 16:00:24 +02:00
Eelco Dolstra 98a105fe69 hydra-build: Give a nicer error message if the derivation is gone 2013-06-14 11:01:53 +00:00
Eelco Dolstra cceab7308b hydra-queue-runner: Handle restarted builds whose derivation is gone
Restarted builds whose derivation has been garbage-collected in the
meantime caused hydra-queue-runner to get stuck in a loop saying:

Jun 14 11:54:25 lucifer hydra-queue-runner[31844]: system type `x86_64-darwin': 0 active, 2 allowed, started 2 builds
Jun 14 11:54:25 lucifer hydra-queue-runner[31844]: {UNKNOWN}: path `/nix/store/wcizsch2garjlvs4pswrar47i1hwjaia-inconsolata.drv' is not valid at
/nix/store/ypkdm4v13yrk941rvp8h0y425a5ww6nm-hydra-0.1pre1353-40debf1/bin/.hydra-queue-runner-wrapped line 51. at
/nix/store/kjpsc2zdaxnd44azxyw60f2px839m1cd-hydra-perl-deps/lib/perl5/site_perl/5.16.2/Catalyst/Model/DBIC/Schema.pm line 501
2013-06-14 11:00:05 +00:00
Eelco Dolstra 289b29791f Add note on restarting builds that times out 2013-06-13 20:54:28 +02:00
Eelco Dolstra 0046c81857 Remove Switch dependency, we're not using it 2013-06-13 15:14:33 +02:00
Eelco Dolstra 7a926935a5 Add Catalyst::DispatchType::Regex for forward compatibility 2013-06-13 15:13:52 +02:00
Eelco Dolstra 1c30a777ad Fix project/jobset deletion 2013-06-11 16:57:22 +02:00
Eelco Dolstra 40debf1515 hydra-queue-runner: Don't unlock builds we just started
This happens if the previous iteration took more than 60 seconds.
Then the queue runner may think that builds failed to start properly
and unlock them, e.g.

build 5264936 pid 19248 died, unlocking
build 5264951 pid 19248 died, unlocking
build 5257073 pid 19248 died, unlocking
...
2013-06-07 20:15:37 +00:00
Eelco Dolstra 5d9b7c6ab2 Speed up findBuildDependencyInQueue
This was taking a long time due to the giant SQL query.

Issue #99.
2013-06-07 20:15:32 +00:00
Eelco Dolstra 8e36343b62 hydra-queue-runner: Start as many builds as possible on each iteration
Because we don't start a build if a dependency is already building,
it's possible that some or all of the $extraAllowed highest-priority
builds in the queue are not eligible.  E.g. with $extraAllowed = 32,
we might start only 3 builds even though there are thousands in the
queue.  The fix is to try all queued builds until $extraAllowed have
been started.

Issue #99.
2013-06-07 20:15:20 +00:00
Eelco Dolstra 2974fea1a7 Use https://ajax.googleapis.com if we're on https 2013-06-07 15:45:37 +02:00
Eelco Dolstra f4ecf27def Fix Perl warning about $path masking earlier definition 2013-06-02 23:32:09 +02:00
Eelco Dolstra 8e246a835a Don't do camel case in filenames 2013-06-02 23:30:46 +02:00
Eelco Dolstra 66c695e1c3 Fix ‘Unable to handle files with the extension 'conf'’
Config::Any uses Module::Pluggable to seach for plugins, so it needs
the patched Module::Pluggable in Nixpkgs (rather than the one in Perl
itself) to properly find plugins in symlink trees created by buildEnv.
2013-06-02 23:29:24 +02:00
Shea Levy 591acda6f9 reproduce.tt: Save the revCount when reproducing more than once
Signed-off-by: Shea Levy <shea@shealevy.com>
2013-05-30 14:06:32 -04:00
Shea Levy 8e716ff062 reproduce.tt: Create the checkout dir before an hg clone
For some reason, hg clone from a local (path-based) repo will fail if
the parent directory of the destination directory doesn't exist (though
it succeeds when cloning from an http repo).

Signed-off-by: Shea Levy <shea@shealevy.com>
2013-05-30 13:31:53 -04:00