The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

WebService::TeamCity::Entity::Build - A single TeamCity build

VERSION

version 0.04

SYNOPSIS

    my $build = ...;

    if ( $build->passed ) { ... }

DESCRIPTION

This class represents a single TeamCity build.

API

This class has the following methods:

$build->href

Returns the REST API URI for the build, without the scheme and host.

$build->id

Returns the build's id string.

$build->status

Returns the build's status string.

$build->passed

Returns true if the build passed. Note that both both passed and failed can return false if the build is not yet finished.

$build->failed

Returns true if the build failed. Note that both both passed and failed can return false if the build is not yet finished.

$build->web_url

Returns a browser-friendly URI for the build.

$build->build_type

Returns the WebService::TeamCity::Entity::BuildType object for this build's type.

$build->test_occurrences

Returns a WebService::TeamCity::Iterator for each of the build's test occurrences. The iterator returns WebService::TeamCity::Entity::TestOccurrence objects.

$build->branch_name

Returns the branch name for this build. Note that this might be undef.

$build->has_branch_name

Returns true if there is a branch associated with the build.

$build->default_branch

Returns true or false indicating whether the build used the default branch.

$build->has_default_branch

Returns true or false indicating whether there is any information about the default branch. Builds can exist without an associated branch, in which case this returns false.

$build->number

Returns the build's build number (which can actually be a string).

$build->state

Returns a string describing the build's state.

$build->queued_date

Returns a DateTime object indicating when the build was queued.

$build->start_date

Returns a DateTime object indicating when the build was started. If the build has not yet been started then this returns undef.

$build->finish_date

Returns a DateTime object indicating when the build was finished. If the build has not yet been finished then this returns undef.

$build->artifacts_dir

This method fetches all of the artifacts for the build and extracts them to a new temporary directory. It then returns the directory containing the artifacts as a Path::Tiny object.

Note that this temporary directory will be cleaned up when the build object goes out of scope.

SUPPORT

Bugs may be submitted through https://github.com/maxmind/WebService-TeamCity/issues.

AUTHOR

Dave Rolsky <autarch@urth.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2018 by MaxMind, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.