Ukigumo::Client - Client library for Ukigumo
use Ukigumo::Client;
use Ukigumo::Client::VC::Git;
use Ukigumo::Client::Executor::Auto;
use Ukigumo::Client::Notify::Debug;
use Ukigumo::Client::Notify::Ikachan;
my $app = Ukigumo::Client->new(
vc => Ukigumo::Client::VC::Git->new(
branch => $branch,
repository => $repo,
),
executor => Ukigumo::Client::Executor::Perl->new(),
server_url => $server_url,
project => $project,
);
$app->push_notifier(
Ukigumo::Client::Notify::Ikachan->new(
url => $ikachan_url,
channel => $ikachan_channel,
)
);
$app->run();
Ukigumo::Client is client library for Ukigumo.
-
workdirWorking directory for the code. It's
$ENV{HOME}/.ukigumo/work/$project/$branchby default. -
projectIts' project name. This is a mandatory parameter.
-
logfhLog file handle. It's read only parameter.
-
server_urlURL of the Ukigumo server. It's required.
-
user_agentinstance of LWP::UserAgent. It's have a default value.
-
vcThis is a version controller object. It's normally Ukigumo::Client::VC::*. But you can write your own class.
VC::* objects should have a following methods:
get_revision branch repository -
executorThis is a test executor object. It's normally Ukigumo::Client::Executor::*. But you can write your own class.
-
notifiersThis is a arrayref of notifier object. It's normally Ukigumo::Client::Notify::*. But you can write your own class.
-
compare_urlURL to compare differences between range of commitments.
-
elapsed_time_secElapsed time as seconds about executing tests.
-
$client->push_notifier($notifier : Ukigumo::Client::Notify)
push a notifier object to $client->notifiers.
-
$client->run()
Run a test context.
-
$client->send_to_server($status: Int)
Send a notification to the sever.
-
reflect_result($status: Int)
Send a notification to the server and notify via registered notifier.
-
$client->tee($command: Str)
This method runs
$commandand tee the output of the STDOUT/STDERR to thelogfh.Return: exit code by the
$command. -
$client->logger->infof($message)
Print
$messageas INFO and write to thelogfh. -
$client->logger->warnf($message)
Print
$messageas WARN and write to thelogfh. -
$client->report_timeout()
This method always sends FAIL report to server and notifies to each notifiers.
If .ukigumo.yml file is on the project root, Ukigumo::Client loads that file and applies the settings that are written in it.
Please see also ukigumo.yml.pod.
Tokuhiro Matsuno <tokuhirom AAJKLFJEF@ GMAIL COM>
Copyright (C) Tokuhiro Matsuno
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
