NAME

BuildForge::Services::DBO::Result


SYNOPSIS

        use BuildForge::Services;
        $conn = new BuildForge::Services::Connection($hostname);
        $token = $conn->authUser($user, $pass);
        
        # Getting build results from an existing build
        $project = new BuildForge::Services::DBO::Project($conn);
        $project->setName('Test Project');
        $project->create();
        $build = BuildForge::Services::DBO::Build->fire($conn, $project->getProjectId());
        $results = $build->getResults();
        $result = $results->[0];
        $results2 = BuildForge::Services::DBO::Build->findByBuild($conn, $build->getBuildId(), 
                        $alsoGetCommand, $alsoGetEnvironmentBlock)
        # Getter functions
        $buildId = $result->getBuildId();
        $stepId = $result->getUid();
        $resultStepId = $result->getResultStepId();
        $wasAbsolute = $result->getAbsolute();
        $wasBroadcast = $result->getBroadcast();
        $callingBuild = $result->getCaller();
        $buildKickedOffByResult = $result->getChainedBuildId();
        $inlinedProjectId = $result->getChainId();
        $stepCommand = $result->getCommandText();
        $stepDescription = $result->getDescription();
        $stepDirectory = $result->getDirectory();
        $durationInSeconds = $result->getDuration();
        $environmentId = $result->getEnvironmentGroupId();
        $environmentBlock = $result->getEnvironmentText();
        $projectIdToRunOnStepFailure = $result->getFailChainId();
        $accessGroupIdToNotifyOnStepFailure = $result->getFailNotify();
        $failWait = $result->getFailWait();
        $filterSetId = $result->getFilterSetId();
        $finishTimestamp = $result->getFinish();
        $skippedOrCancelled = $result->getFlag();
        $serverExplicitlySet = $result->getFloating();
        $accessGroupId = $result->getLevel();
        $continueOnFail = $result->getOnFail();
        $stepId = $result->getOriginalStepId();
        $userId = $result->getOwner();
        $projectIdToRunOnStepPass = $result->getPassChainId();
        $accessGroupIdToNotifyOnStepPass = $result->getPassNotify();
        $passWait = $result->getPassWait();
        $projectId = $result->getProjectId();
        $selectorId = $result->getResource();
        $resultCode = $result->getResult();
        $serverId = $result->getServer();
        $startTimestamp = $result->getStartTimestamp();
        $wasThreaded = $result->getThreaded();
        $stepTimeout = $result->getTimeout();
        $logs = $result->getLogs();
                
        $conn->logout;
        $conn->close;


DESCRIPTION

Result allows you to access the individual step results from an existing build. Many fields are duplicated directly from the BuildForge::Services::DBO::Step object. Check there for more details if necessary.


METHODS

BuildForge::Services::DBO::Build->findByBuild(connection, buildId, getCommand, getEnvironment)

Returns a reference to an array of BuildForge::Services::DBO::Build objects for the individual step results of the desired build.

connection

A connected BuildForge::Services::Connection object.

buildId

The build ID (from $build->getBuildId()) of the build from which to get step results.

getCommand

If this evaluates to true, the step commands will be part of the returned objects and $result->getCommandText() will return them. Otherwise, $result->getCommandText() returns the empty string.

getEnvironment

If this evaluates to true, the step environment text will be part of the returned objects and $result->getEnvironmentText() will return it. Otherwise, $result->getEnvironmentText() returns the empty string.

$result->getBuildId()

Returns the build ID of the build that this step result set belongs to.

$result->getUid()

Returns the ID of this step result set.

$result->getResultStepId()

Returns the step number as executed. That is, if this was the first step started, this will return 1, if it was the second step, it returns 2, etc.

$result->getAbsolute()

Returns 1 if the step was set to absolute path, 0 if it was relative.

$result->getBroadcast()

Returns 1 if the step was a broadcast step, 0 otherwise.

$result->getCaller()

If this step was inlined by another step, and the inlining step was threaded, this will return the step ID (as in $result->getResultStepId()) of the inlining step. Otherwise, 0.

$result->getChainedBuildId()

If a build was chained by this step, either from a pass or fail chain, this will return the build ID of the build that was chained. Otherwise, it returns 0.

$result->getChainId()

Returns the project ID of the project that got inlined from this step or 0 if no inlining occurred.

$result->getCommandText()

Returns the step command if this result was found with BuildForge::Services::DBO::Build->findByBuild and getCommand was set or the empty string otherwise.

$result->getDescription()

Returns the step name.

$result->getDirectory()

Returns the directory the step executed in relative to the build directory (if this was a relative step) or to the base server directory (if this was an absolute step).

$result->getDuration()

Returns the time in seconds the step took to execute.

$result->getEnvironmentGroupId()

Returns the environment group ID of the environment the step had applied to it over the project environment.

$result->getEnvironmentText()

Returns the step environment if this result was found with BuildForge::Services::DBO::Build->findByBuild and getEnvironment was set or the empty string otherwise.

$result->getFailChainId()

Returns the project ID if the step was set to chain a project on failure or 0 otherwise. This will be set to the project ID whether the step passed or failed.

$result->getFailNotify()

Returns the access group ID if the step was set to notify an access group on failure or 0 otherwise. This will be set to the access group ID whether the step passed or failed.

$result->getFailWait()

Returns 1 if the step was set to wait for the chained build to complete on failure and 0 otherwise.

$result->getFilterSetId()

Returns the filter set ID if the step had one set or 0 otherwise.

$result->getFinish()

Returns the timestamp at which the step finished processing.

$result->getFlag()

This will return 'RUN' if the step is running / ran normally, 'SKIP' if the step was skipped, 'CANCEL' if the step was cancelled, or 'PAUSE' if the step is being paused.

$result->getFloating()

This will return 'FIXED' if the step's selector was explicitly set, 'NO' if the step is not sticky, 'YES' if the step was sticky but a server hasn't been picked for it, or 'STUCK' if the step was sticky and a server has been picked for it.

$result->getLevel()

Returns the access group ID of the access group that owns the step. Users not in the access group cannot view the step results.

$result->getLogs()

Returns a reference to an array of BuildForge::Services::DBO::Log objects, one for each line of the step output.

$result->getOnFail()

Returns 1 if the step was set to continue on failure or 0 otherwise.

$result->getOriginalStepId()

Returns the original step number within its project.

$result->getOwner()

Returns the step ID (from $result->getResultSetId()) of the step that inlined this one if this was an inlined step and 0 otherwise.

$result->getPassChainId()

Returns the project ID if the step was set to chain a project on success or 0 otherwise. This will be set to the project ID whether the step passed or failed.

$result->getPassNotify()

Returns the access group ID if the step was set to notify an access group on success or 0 otherwise. This will be set to the access group ID whether the step passed or failed.

$result->getPassWait()

Returns 1 if the step was set to wait for the chained build to complete on success and 0 otherwise.

$result->getProjectId()

Returns the project ID of the project the step originally belonged to.

$result->getResource()

Returns the selector on which the step has run.

$result->getResult()

This may return any of:

NONE

If the step has not yet started processing.

RUNNING

If the step is currently running.

PASSED

If the step passed successfully.

STOPPED

If the step has been paused.

SKIPPED

If the step has been skipped.

FAILWARN

If the step failed but has continue on failure set.

FILTWARN

If the step has a filter ID and the filter set passed with warnings.

FAILED

If the step failed.

$result->getServer()

Returns the name of the server on which the step has run.

$result->getStartTimestamp()

Returns the timestamp for the time the step started executing.

$result->getThreaded()

Returns 'NO' if the step is unthreaded, 'YES' if the step is threaded, or 'JOIN' if the step is a join step.

$result->getTimeout()

Returns the timeout time in seconds for the original step.


COPYRIGHT

Copyright (c)2006-2007 International Business Machines, Inc. All rights reserved.