getBuildId()
getUid()
getResultStepId()
getAbsolute()
getBroadcast()
getCaller()
getChainedBuildId()
getChainId()
getCommandText()
getDescription()
getDirectory()
getDuration()
getEnvironmentGroupId()
getEnvironmentText()
getFailChainId()
getFailNotify()
getFailWait()
getFilterSetId()
getFinish()
getFlag()
getFloating()
getLevel()
getLogs()
getOnFail()
getOriginalStepId()
getOwner()
getPassChainId()
getPassNotify()
getPassWait()
getProjectId()
getResource()
getResult()
getServer()
getStartTimestamp()
getThreaded()
getTimeout()
BuildForge::Services::DBO::Result
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;
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.
Returns a reference to an array of BuildForge::Services::DBO::Build objects for the individual step results of the desired build.
A connected BuildForge::Services::Connection object.
The build ID (from $build->getBuildId())
of the build from which to get step results.
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.
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.
getBuildId()
Returns the build ID of the build that this step result set belongs to.
getUid()
Returns the ID of this step result set.
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.
getAbsolute()
Returns 1 if the step was set to absolute path, 0 if it was relative.
getBroadcast()
Returns 1 if the step was a broadcast step, 0 otherwise.
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.
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.
getChainId()
Returns the project ID of the project that got inlined from this step or 0 if no inlining occurred.
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.
getDescription()
Returns the step name.
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).
getDuration()
Returns the time in seconds the step took to execute.
getEnvironmentGroupId()
Returns the environment group ID of the environment the step had applied to it over the project environment.
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.
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.
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.
getFailWait()
Returns 1 if the step was set to wait for the chained build to complete on failure and 0 otherwise.
getFilterSetId()
Returns the filter set ID if the step had one set or 0 otherwise.
getFinish()
Returns the timestamp at which the step finished processing.
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.
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.
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.
getLogs()
Returns a reference to an array of BuildForge::Services::DBO::Log objects, one for each line of the step output.
getOnFail()
Returns 1 if the step was set to continue on failure or 0 otherwise.
getOriginalStepId()
Returns the original step number within its project.
getOwner()
Returns the step ID (from $result->getResultSetId())
of the step that inlined this one
if this was an inlined step and 0 otherwise.
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.
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.
getPassWait()
Returns 1 if the step was set to wait for the chained build to complete on success and 0 otherwise.
getProjectId()
Returns the project ID of the project the step originally belonged to.
getResource()
Returns the selector on which the step has run.
getResult()
This may return any of:
If the step has not yet started processing.
If the step is currently running.
If the step passed successfully.
If the step has been paused.
If the step has been skipped.
If the step failed but has continue on failure set.
If the step has a filter ID and the filter set passed with warnings.
If the step failed.
getServer()
Returns the name of the server on which the step has run.
getStartTimestamp()
Returns the timestamp for the time the step started executing.
getThreaded()
Returns 'NO' if the step is unthreaded, 'YES' if the step is threaded, or 'JOIN' if the step is a join step.
getTimeout()
Returns the timeout time in seconds for the original step.
Copyright (c)2006-2007 International Business Machines, Inc. All rights reserved.