Test::BrewBuild::Dispatch - Dispatch Test::BrewBuild test runs to remote test servers.
Test::BrewBuild
use Test::BrewBuild::Dispatch; my $d = Test::BrewBuild::Dispatch->new; my $return = $d->dispatch( cmd => 'brewbuild -r -R', testers => [qw(127.0.0.1 10.1.1.1:9999)], repo => 'https://github.com/user/repo', ); print $return;
This is the remote dispatching system of Test::BrewBuild.
It dispatches out test runs to Test::BrewBuild::Tester remote test servers to perform, then processes the results returned from those testers.
By default, we try to look up the repository information from your current working directory. If it can't be found, you must supply it on the command line or within the configuration file.
Returns a new Test::BrewBuild::Dispatch object.
Test::BrewBuild::Dispatch
cmd is the brewbuild command string that will be executed.
cmd
brewbuild
repo is the name of the repo to test against, and is optional. If not supplied, we'll attempt to get a repo name from the local working directory you're working in. If it's a Github repo, you need not enter in the full path... we'll prepend https://github.com/ if you send in user/repo-name.
repo
https://github.com/
user/repo-name
testers is manadory unless you've set up a config file, and contains an array reference of IP/Port pairs for remote testers to dispatch to and follow. eg: [qw(10.1.1.5 172.16.5.5:9999)]. If the port portion of the tester is omitted, we'll default to 7800.
testers
[qw(10.1.1.5 172.16.5.5:9999)]
7800
By default, the testers run on all IPs and port TCP/7800.
TCP/7800
debug optional, set to a level between 0 and 7.
debug
See Test::BrewBuild::Tester for more details on the testers that the dispatcher dispatches to.
This function will spin off a continuous run of dispatch() runs, based on whether the commit revision checksum locally is different than that from the remote. It takes all of the same parameters as dispatch(), and the -r|--repo parameter is mandatory.
dispatch()
-r|--repo
There is also a configuration file directive in the [Dispatch] section, auto_sleep, which dictates how many seconds to sleep in between each run. The default is 60, or one minute.
[Dispatch]
auto_sleep
60
Steve Bertrand, <steveb at cpan.org>
<steveb at cpan.org>
Copyright 2017 Steve Bertrand.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
To install Test::BrewBuild, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Test::BrewBuild
CPAN shell
perl -MCPAN -e shell install Test::BrewBuild
For more information on module installation, please visit the detailed CPAN module installation guide.