Class WorkflowRun
- All Implemented Interfaces:
ExtensionPoint,DescriptorByNameOwner,ModelObject,PersistenceRoot,Queue.Executable,Saveable,SearchableModelObject,SearchItem,AccessControlled,Comparable<WorkflowRun>,Runnable,WithConsoleUrl,HistoricalBuild,LazyBuildMixIn.LazyLoadingRun<WorkflowJob,,WorkflowRun> ModelObjectWithContextMenu,RunWithSCM<WorkflowJob,,WorkflowRun> OnMaster,org.jenkinsci.plugins.workflow.flow.FlowExecutionOwner.Executable,org.kohsuke.stapler.StaplerProxy
public final class WorkflowRun
extends Run<WorkflowJob,WorkflowRun>
implements org.jenkinsci.plugins.workflow.flow.FlowExecutionOwner.Executable, LazyBuildMixIn.LazyLoadingRun<WorkflowJob,WorkflowRun>, RunWithSCM<WorkflowJob,WorkflowRun>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic final classNested classes/interfaces inherited from class hudson.model.Run
Run.Artifact, Run.ArtifactList, Run.BasicRunDetailFactory, Run.KeepLogBuildBadge, Run.RedirectUp, Run.RunExecution, Run.Runner, Run.RunnerAbortedException, Run.StatusSummarizer, Run.SummaryNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudsonNested classes/interfaces inherited from interface jenkins.model.ModelObjectWithContextMenu
ModelObjectWithContextMenu.ContextMenu, ModelObjectWithContextMenu.ContextMenuVisibility, ModelObjectWithContextMenu.MenuItem, ModelObjectWithContextMenu.MenuItemType -
Field Summary
Fields inherited from class hudson.model.Run
ARTIFACTS, charset, DELETE, description, duration, FEED_ADAPTER, FEED_ADAPTER_LATEST, LIST_CUTOFF, nextBuild, number, ORDER_BY_DATE, PERMISSIONS, previousBuild, project, QUEUE_ID_UNKNOWN, result, SKIP_PERMISSION_CHECK, timestamp, UPDATE, XSTREAM, XSTREAM2 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.jenkinsci.plugins.workflow.flow.FlowExecutionOwnerprotected BuildReference<WorkflowRun>voidvoiddoConsoleText(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) voiddoKill()Immediately kills the build.org.kohsuke.stapler.HttpResponsedoStop()voiddoTerm()SendsFutureCallback.onFailure(java.lang.Throwable)to all running (leaf) steps.protected voidList<ChangeLogSet<? extends ChangeLogSet.Entry>>getEnvironment(TaskListener listener) org.jenkinsci.plugins.workflow.flow.FlowExecutionGets the associated execution state, and do a more expensive loading operation if not initialized.com.google.common.util.concurrent.ListenableFuture<org.jenkinsci.plugins.workflow.flow.FlowExecution>Allows the caller to block onFlowExecution, which gets created relatively quickly after the build gets going.For use by Jelly only.getLog()getLog(int maxLines) Deprecated.getSCMs()booleanbooleanbooleanorg.kohsuke.stapler.HttpResponsehttpKill()Immediately kills the build.org.kohsuke.stapler.HttpResponsehttpTerm()SendsFutureCallback.onFailure(java.lang.Throwable)to all running (leaf) steps.booleanbooleanbooleanprotected voidonLoad()voidreload()Hack to allowexecutionto use anWorkflowRun.Ownerreferring to this run, even when it has not yet been loaded.voidrun()Actually executes the workflow.voidsave()voidbooleanMethods inherited from class hudson.model.Run
_this, addAction, canToggleLogKeep, compareTo, delete, doArtifact, doBuildNumber, doBuildStatus, doBuildTimestamp, doConfigSubmit, doConsoleText, doDoDelete, doDoDelete, doProgressiveLog, doSubmitDescription, doToggleLogKeep, execute, fromExternalizableId, getAbsoluteUrl, getACL, getApi, getArtifactManager, getArtifacts, getArtifactsDir, getArtifactsUpTo, getBadgeActions, getBuildFingerprints, getBuildsOverThreshold, getBuildStatusSummary, getCause, getCauses, getCharacteristicEnvVars, getCharset, getConsoleUrl, getDescription, getDisplayName, getDuration, getDurationString, getDynamic, getDynamic, getEnvironment, getEnvVars, getEstimatedDuration, getExecutor, getExternalizableId, getFullDisplayName, getHasArtifacts, getIconColor, getId, getNumber, getOneOffExecutor, getParameterValues, getParent, getPreviousBuildInProgress, getPreviousBuildsOverThreshold, getPreviousBuiltBuild, getPreviousCompletedBuild, getPreviousFailedBuild, getPreviousNotFailedBuild, getPreviousSuccessfulBuild, getQueueId, getResult, getRootDir, getSearchUrl, getStartTimeInMillis, getTarget, getTime, getTimeInMillis, getTimestamp, getTimestampString, getTimestampString2, getTransientActions, getUrl, getWhyKeepLog, hasCustomDisplayName, isKeepLog, keepLog, keepLog, makeSearchIndex, onEndBuilding, onStartBuilding, pickArtifactManager, run, setDescription, setDisplayName, setQueueId, submit, toString, updateSymlinks, writeLogTo, writeReplace, writeWholeLogToMethods inherited from class hudson.model.Actionable
addOrReplaceAction, doContextMenu, doContextMenu, getAction, getAction, getActions, getActions, getAllActions, removeAction, removeActions, replaceAction, replaceActionsMethods inherited from class hudson.model.AbstractModelObject
getSearch, getSearchIndex, getSearchName, requirePOST, sendError, sendError, sendError, sendError, sendError, sendError, sendError, sendErrorMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface hudson.security.AccessControlled
checkAnyPermission, checkPermission, hasAnyPermission, hasPermission, hasPermission, hasPermission2Methods inherited from interface hudson.model.DescriptorByNameOwner
getDescriptorByNameMethods inherited from interface jenkins.model.HistoricalBuild
getBuildStatusIconClassName, getBuildStatusUrl, getTruncatedDescriptionMethods inherited from interface hudson.model.Queue.Executable
getConsoleUrl, getEstimatedDuration, getParent, getParentExecutable, toStringMethods inherited from interface jenkins.scm.RunWithSCM
calculateCulprits, hasParticipantMethods inherited from interface hudson.search.SearchItem
getSearchGroup, getSearchIcon
-
Constructor Details
-
WorkflowRun
- Throws:
IOException
-
WorkflowRun
- Throws:
IOException
-
-
Method Details
-
getRunMixIn
- Specified by:
getRunMixInin interfaceLazyBuildMixIn.LazyLoadingRun<WorkflowJob,WorkflowRun>
-
createReference
- Overrides:
createReferencein classRun<WorkflowJob,WorkflowRun>
-
dropLinks
protected void dropLinks()- Overrides:
dropLinksin classRun<WorkflowJob,WorkflowRun>
-
getPreviousBuild
- Overrides:
getPreviousBuildin classRun<WorkflowJob,WorkflowRun>
-
getNextBuild
- Overrides:
getNextBuildin classRun<WorkflowJob,WorkflowRun>
-
run
public void run()Actually executes the workflow.- Specified by:
runin interfaceQueue.Executable- Specified by:
runin interfaceRunnable
-
doTerm
public void doTerm()SendsFutureCallback.onFailure(java.lang.Throwable)to all running (leaf) steps. -
httpTerm
@WebMethod(name="term") @Restricted(org.kohsuke.accmod.restrictions.DoNotUse.class) public org.kohsuke.stapler.HttpResponse httpTerm()SendsFutureCallback.onFailure(java.lang.Throwable)to all running (leaf) steps. -
doKill
public void doKill()Immediately kills the build. -
httpKill
@WebMethod(name="kill") @Restricted(org.kohsuke.accmod.restrictions.DoNotUse.class) public org.kohsuke.stapler.HttpResponse httpKill()Immediately kills the build. -
getEnvironment
@NonNull public EnvVars getEnvironment(@NonNull TaskListener listener) throws IOException, InterruptedException - Overrides:
getEnvironmentin classRun<WorkflowJob,WorkflowRun> - Throws:
IOExceptionInterruptedException
-
hasAllowTerm
@Restricted(org.kohsuke.accmod.restrictions.DoNotUse.class) public boolean hasAllowTerm() -
hasAllowKill
@Restricted(org.kohsuke.accmod.restrictions.DoNotUse.class) public boolean hasAllowKill() -
reload
Hack to allowexecutionto use anWorkflowRun.Ownerreferring to this run, even when it has not yet been loaded.- Overrides:
reloadin classRun<WorkflowJob,WorkflowRun> - Throws:
IOException
-
onLoad
protected void onLoad()- Overrides:
onLoadin classRun<WorkflowJob,WorkflowRun>
-
setResult
- Overrides:
setResultin classRun<WorkflowJob,WorkflowRun>
-
deleteArtifacts
- Overrides:
deleteArtifactsin classRun<WorkflowJob,WorkflowRun> - Throws:
IOException
-
getExecution
@CheckForNull public org.jenkinsci.plugins.workflow.flow.FlowExecution getExecution()Gets the associated execution state, and do a more expensive loading operation if not initialized. Performs all the needed initialization for the execution pre-loading too -- sets the executionPromise, adds Listener, calls onLoad on it etc.- Returns:
- non-null after the flow has started, even after finished (but may be null temporarily when about to start, or if starting failed)
-
getExecutionPromise
@NonNull public com.google.common.util.concurrent.ListenableFuture<org.jenkinsci.plugins.workflow.flow.FlowExecution> getExecutionPromise()Allows the caller to block onFlowExecution, which gets created relatively quickly after the build gets going. -
asFlowExecutionOwner
@NonNull public org.jenkinsci.plugins.workflow.flow.FlowExecutionOwner asFlowExecutionOwner()- Specified by:
asFlowExecutionOwnerin interfaceorg.jenkinsci.plugins.workflow.flow.FlowExecutionOwner.Executable
-
hasntStartedYet
public boolean hasntStartedYet()- Overrides:
hasntStartedYetin classRun<WorkflowJob,WorkflowRun>
-
isBuilding
public boolean isBuilding()- Specified by:
isBuildingin interfaceHistoricalBuild- Overrides:
isBuildingin classRun<WorkflowJob,WorkflowRun>
-
isInProgress
@Exported public boolean isInProgress()- Overrides:
isInProgressin classRun<WorkflowJob,WorkflowRun>
-
isLogUpdated
public boolean isLogUpdated()- Overrides:
isLogUpdatedin classRun<WorkflowJob,WorkflowRun>
-
getSCMs
-
getChangeSets
- Specified by:
getChangeSetsin interfaceRunWithSCM<WorkflowJob,WorkflowRun>
-
getCulpritIds
- Specified by:
getCulpritIdsin interfaceRunWithSCM<WorkflowJob,WorkflowRun>
-
getCulprits
- Specified by:
getCulpritsin interfaceRunWithSCM<WorkflowJob,WorkflowRun>
-
shouldCalculateCulprits
public boolean shouldCalculateCulprits()- Specified by:
shouldCalculateCulpritsin interfaceRunWithSCM<WorkflowJob,WorkflowRun>
-
doStop
public org.kohsuke.stapler.HttpResponse doStop() -
getLogText
- Overrides:
getLogTextin classRun<WorkflowJob,WorkflowRun>
-
getFlowGraphDataAsHtml
For use by Jelly only. -
getLogInputStream
- Overrides:
getLogInputStreamin classRun<WorkflowJob,WorkflowRun> - Throws:
IOException
-
doConsoleText
public void doConsoleText(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) throws IOException - Overrides:
doConsoleTextin classRun<WorkflowJob,WorkflowRun> - Throws:
IOException
-
getLogReader
- Overrides:
getLogReaderin classRun<WorkflowJob,WorkflowRun> - Throws:
IOException
-
getLog
- Overrides:
getLogin classRun<WorkflowJob,WorkflowRun> - Throws:
IOException
-
getLog
- Overrides:
getLogin classRun<WorkflowJob,WorkflowRun> - Throws:
IOException
-
getLogFile
Deprecated.- Overrides:
getLogFilein classRun<WorkflowJob,WorkflowRun>
-
save
- Specified by:
savein interfaceSaveable- Overrides:
savein classRun<WorkflowJob,WorkflowRun> - Throws:
IOException
-