Commit graph

28 commits

Author SHA1 Message Date
Eelco Dolstra da73eb5f8a Include dependency column in JSON output 2014-05-08 16:36:15 +02: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
Shea Levy 26470f1656 Check all inputs for blame but only email selected inputs
Signed-off-by: Shea Levy <shea@shealevy.com>
2013-10-08 14:47:24 -04:00
Shea Levy 07157f8125 Update Schema classes
Signed-off-by: Shea Levy <shea@shealevy.com>
2013-10-08 13:24:49 -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 30e5185acf Remove the logfile and logSize columns from the database
It's pointless to store these, since Nix knows where the logs are.
Also handle (in fact require) Nix's new log storage scheme.  Also some
cleanups in the build page.
2013-01-22 22:48:02 +01:00
Eelco Dolstra 794602d7ce Drop unused "tag" column
It was intended for CVS inputs but never used.
2012-04-15 12:42:46 +00:00
Eelco Dolstra 179b012a8e Open the DB using Hydra::Model::DB->new
This gets rid of the openHydraDB function and ensures that we
open the database in a consistent way.

Also drop the PostgreSQL sequence hacks.  They don't seem to be
necessary anymore.
2012-03-13 12:10:19 +01:00
Eelco Dolstra 9032c55aa6 Keep track of the database schema version
The singleton table SchemaVersion contains the current version
of the Hydra database schema.  This can be used to upgrade the
schema on the fly.

Also reran the DBIx::Class schema loader.
2011-12-05 14:29:29 +01:00
Rob Vermaas 4dccd3c620 generated schema with new dbix class schema loader, grrrrrr 2010-02-25 09:50:04 +00:00
Rob Vermaas 2fb05b34bf add support for git as jobinput 2009-11-17 15:16:41 +00:00
Eelco Dolstra a515c5fef2 2009-10-23 15:05:16 +00:00
Eelco Dolstra 929cbe7b7c * Adding persistant releases. A release is a named set of builds. 2009-10-21 15:44:17 +00:00
Eelco Dolstra 686b6271d2 * Cleaned up the foreign key constraints.
* Generate SQLite and PostgreSQL schemas from hydra.sql.
2009-10-21 12:25:43 +00:00
Eelco Dolstra cec3201720 * Renaming "release sets" to "views" (not finished yet). Having
releases as a dynamic view on the database was misguided, since
  doing thing like adding a new job to a release set will invalidate
  all old releases.  So we rename release sets to views, and we'll
  reintroduce releases as separate, static entities in the database.
2009-10-15 21:35:19 +00:00
Eelco Dolstra 6cedee5476 * Allow jobsets to be disabled. 2009-10-08 11:39:16 +00:00
Eelco Dolstra e9cf409d80 * Mark the "current" builds in a jobset, i.e. those corresponding to
the derivations that the jobset currently contains.  This is
  necessary to allow the "latest" channel to contain the correct
  builds when the sources of a jobset are reverted.
2009-10-02 16:06:28 +00:00
Eelco Dolstra 5bdd5e7152 * Added a maintainers field to the Builds table.
* Regenerated the schema bindings with the latest DBIx::Class.
2009-07-07 13:59:59 +00:00
Rob Vermaas e457be469c sequence fix for postgresql 2009-05-11 13:56:52 +00:00
Rob Vermaas b52796feac check getHydraPath in stead of Envvar HYDRA_DBI directly 2009-05-09 16:10:50 +00:00
Rob Vermaas f2a1fb3937 Added sequences for auto increment primary key columns (for PostgreSQL) 2009-05-07 13:30:55 +00:00
Eelco Dolstra ae364b9e5f * Represent jobs explicitly in the DB. 2009-03-13 14:49:25 +00:00
Eelco Dolstra f2f586d842 * Disambiguate jobs by jobset name. I.e. jobs with the same name in
different jobsets are not considered the same job.
2009-03-12 23:46:17 +00:00
Eelco Dolstra a623ad157e * Add the name of the jobset to ReleaseSetJobs, otherwise we can't
distinguish between jobs with the same name in different jobsets
  (e.g. "trunk" vs "stdenv-branch" for Nixpkgs).
* Renamed the "attrName" field of Builds to "job".
* Renamed the "id" field of BuildSteps to "build".
2009-03-12 14:18:30 +00:00
Eelco Dolstra fec08462ee * In Sqlite "release" is now a keyword, so use "release_" instead.
Note: to upgrade old databases, do a dump with an old Sqlite first;
  dumping with a new Sqlite will silently discard (!) the contents of
  the ReleaseSetJobs table.
2009-03-12 13:42:44 +00:00
Eelco Dolstra fca7fb20c4 * Negative caching: don't perform a build if a dependency already
failed in a previous build.  This is essential for Nixpkgs: we don't
  want to keep doing the same failed dependency (say, Glibc) over and
  over again for a few hundred jobs.
2009-03-09 17:21:10 +00:00
Eelco Dolstra 36fdd7f37f * For products that are directories (like manuals), allow a default
suffix other than index.html to be declared.  E.g. if a build does

    echo "doc manual $out manual.html" >> $out/nix-support/hydra-build-products

  the default link for the product is

    http://localhost:3000/build/417/download/1/manual.html

  but other files are also accessible, e.g.
    
    http://localhost:3000/build/417/download/1/style.css
2009-03-06 13:34:53 +00:00
Eelco Dolstra 97ed2052ba * Move everything up one directory. 2009-03-05 13:41:57 +00:00
Renamed from src/Hydra/lib/Hydra/Schema/BuildInputs.pm (Browse further)