com.cloudbees.plugins.flow
Class FlowRun

java.lang.Object
  extended by hudson.model.AbstractModelObject
      extended by hudson.model.Actionable
          extended by hudson.model.Run<P,R>
              extended by hudson.model.AbstractBuild<BuildFlow,FlowRun>
                  extended by com.cloudbees.plugins.flow.FlowRun
All Implemented Interfaces:
hudson.ExtensionPoint, hudson.model.DescriptorByNameOwner, hudson.model.ModelObject, hudson.model.PersistenceRoot, hudson.model.Queue.Executable, hudson.model.Saveable, hudson.search.SearchableModelObject, hudson.search.SearchItem, hudson.security.AccessControlled, java.lang.Comparable<FlowRun>, java.lang.Runnable

public class FlowRun
extends hudson.model.AbstractBuild<BuildFlow,FlowRun>

Maintain the state of execution of a build flow as a chain of triggered jobs

Author:
Nicolas De loof

Nested Class Summary
protected  class FlowRun.RunnerImpl
           
 
Nested classes/interfaces inherited from class hudson.model.AbstractBuild
hudson.model.AbstractBuild.AbstractRunner, hudson.model.AbstractBuild.DependencyChange
 
Nested classes/interfaces inherited from class hudson.model.Run
hudson.model.Run.Artifact, hudson.model.Run.ArtifactList, hudson.model.Run.KeepLogBuildBadge, hudson.model.Run.RedirectUp, hudson.model.Run.Runner, hudson.model.Run.RunnerAbortedException, hudson.model.Run.Summary
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Field Summary
 
Fields inherited from class hudson.model.AbstractBuild
buildEnvironments
 
Fields inherited from class hudson.model.Run
ARTIFACTS, charset, DELETE, description, duration, FEED_ADAPTER, FEED_ADAPTER_LATEST, ID_FORMATTER, LIST_CUTOFF, nextBuild, number, ORDER_BY_DATE, PERMISSIONS, previousBuild, project, result, state, timestamp, TREE_CUTOFF, UPDATE, XSTREAM, XSTREAM2
 
Fields inherited from interface hudson.model.Saveable
NOOP
 
Constructor Summary
FlowRun(BuildFlow job)
           
FlowRun(BuildFlow project, java.io.File buildDir)
           
 
Method Summary
 void addBuild(JobInvocation build)
           
protected  hudson.model.Run.Runner createRunner()
           
 BuildFlow getBuildFlow()
           
 org.jgrapht.DirectedGraph<JobInvocation,java.lang.String> getBuilds()
           
 void run()
           
 void setResult(hudson.model.Result result)
          {Run#setResult} only let result get worst.
 
Methods inherited from class hudson.model.AbstractBuild
delete, doStop, due, getAggregatedTestResultAction, getBuildVariableResolver, getBuildVariables, getBuiltOn, getBuiltOnStr, getChangeSet, getCulprits, getDependencyChanges, getDownstreamBuilds, getDownstreamBuilds, getDownstreamRelationship, getEnvironment, getHudsonVersion, getModuleRoot, getModuleRoots, getProject, getRootBuild, getSensitiveBuildVariables, getTestResultAction, getTransitiveUpstreamBuilds, getUpstreamBuilds, getUpstreamRelationship, getUpstreamRelationshipBuild, getUpUrl, getWhyKeepLog, getWorkspace, hasChangeSetComputed, hasParticipant, setWorkspace
 
Methods inherited from class hudson.model.Run
addAction, checkPermission, compareTo, deleteArtifacts, doArtifact, doBuildNumber, doBuildStatus, doBuildTimestamp, doConfigSubmit, doConsoleText, doDoDelete, doProgressiveLog, doSubmitDescription, doToggleLogKeep, fromExternalizableId, getAbsoluteUrl, getACL, getApi, getArtifacts, getArtifactsDir, getArtifactsUpTo, getBadgeActions, getBuildStatusSummary, getBuildStatusUrl, getCause, getCauses, getCharacteristicEnvVars, getCharset, getDescription, getDescriptorByName, getDisplayName, getDuration, getDurationString, getDynamic, getEnvironment, getEnvVars, getEstimatedDuration, getExecutor, getExternalizableId, getFullDisplayName, getHasArtifacts, getIconColor, getId, getIDFormatter, getLog, getLog, getLogFile, getLogInputStream, getLogReader, getLogText, getNextBuild, getNumber, getPreviousBuild, getPreviousBuildInProgress, getPreviousBuildsOverThreshold, getPreviousBuiltBuild, getPreviousCompletedBuild, getPreviousFailedBuild, getPreviousNotFailedBuild, getPreviousSuccessfulBuild, getResult, getRootDir, getSearchUrl, getTime, getTimeInMillis, getTimestamp, getTimestampString, getTimestampString2, getTruncatedDescription, getUrl, hasCustomDisplayName, hasntStartedYet, hasPermission, isBuilding, isKeepLog, isLogUpdated, keepLog, keepLog, makeSearchIndex, onEndBuilding, onLoad, onStartBuilding, reload, run, save, setDescription, setDisplayName, submit, toString, writeLogTo
 
Methods inherited from class hudson.model.Actionable
getAction, getAction, getActions, getActions
 
Methods inherited from class hudson.model.AbstractModelObject
getSearch, getSearchIndex, getSearchName, requirePOST, sendError, sendError, sendError, sendError, sendError
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface hudson.model.Queue.Executable
getEstimatedDuration, toString
 

Constructor Detail

FlowRun

public FlowRun(BuildFlow job)
        throws java.io.IOException
Throws:
java.io.IOException

FlowRun

public FlowRun(BuildFlow project,
               java.io.File buildDir)
        throws java.io.IOException
Throws:
java.io.IOException
Method Detail

getBuilds

public org.jgrapht.DirectedGraph<JobInvocation,java.lang.String> getBuilds()

getBuildFlow

public BuildFlow getBuildFlow()

addBuild

public void addBuild(JobInvocation build)
              throws java.util.concurrent.ExecutionException,
                     java.lang.InterruptedException
Throws:
java.util.concurrent.ExecutionException
java.lang.InterruptedException

setResult

public void setResult(hudson.model.Result result)
{Run#setResult} only let result get worst. For the build-flow we support result reset to manage retry or try+finally logic

Overrides:
setResult in class hudson.model.Run<BuildFlow,FlowRun>

run

public void run()
Specified by:
run in interface hudson.model.Queue.Executable
Specified by:
run in interface java.lang.Runnable
Specified by:
run in class hudson.model.AbstractBuild<BuildFlow,FlowRun>

createRunner

protected hudson.model.Run.Runner createRunner()


Copyright © 2004-2012. All Rights Reserved.