Branch: refs/heads/master
Home: https://github.com/NixOS/hydra
Commit: 1d8bb0764bb14072c2bac953b21fd9516bbc9baa
https://github.com/NixOS/hydra/commit/1d8bb0764bb14072c2bac953b21fd9516bbc9baa
Author: Eelco Dolstra <[email protected]>
Date: 2013-05-08 (Wed, 08 May 2013)
Changed paths:
A src/lib/Hydra/Plugin.pm
A src/lib/Hydra/Plugin/EmailNotification.pm
M src/script/hydra-build
Log Message:
-----------
Add a plugin mechanism
You can now add plugins to Hydra by writing a module called
Hydra::Plugin::<whatever> and putting it in Perl's search path. The
only plugin operation currently supported in buildFinished, called
when hydra-build has finished doing a build.
For instance, a Twitter notification plugin would look like this:
package Hydra::Plugin::TwitterNotification;
sub buildFinished {
my ($self, $db, $config, $build, $dependents) = @_;
print STDERR "tweeting about build ", $build->id, "\n";
# send tweet...
}
1;
Commit: a420a33f6623837439b3634eb21d62fa30b31a33
https://github.com/NixOS/hydra/commit/a420a33f6623837439b3634eb21d62fa30b31a33
Author: Eelco Dolstra <[email protected]>
Date: 2013-05-08 (Wed, 08 May 2013)
Changed paths:
M src/script/hydra-build
Log Message:
-----------
Use "can" to check whether a plugin supports buildFinished
Commit: 44b8d6f4491faec02bcc94f44414708489fa1d86
https://github.com/NixOS/hydra/commit/44b8d6f4491faec02bcc94f44414708489fa1d86
Author: Eelco Dolstra <[email protected]>
Date: 2013-05-08 (Wed, 08 May 2013)
Changed paths:
M src/lib/Hydra/Plugin.pm
M src/lib/Hydra/Plugin/EmailNotification.pm
M src/script/hydra-build
Log Message:
-----------
Use OO-style plugins
This is mostly so we don't have to pass around common parameters like
"db" and "config", and we don't have to check for the existence of
methods.
A plugin now looks like this:
package Hydra::Plugin::TwitterNotification;
use parent 'Hydra::Plugin';
sub buildFinished {
my ($self, $build, $dependents) = @_;
print STDERR "tweeting about build ", $build->id, "\n";
# Send tweet...
# Hydra database is $self->{db}.
}
Compare: https://github.com/NixOS/hydra/compare/f447c7d9dbcc...44b8d6f4491f
_______________________________________________
nix-commits mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-commits