Class WorkflowJob
- All Implemented Interfaces:
ExtensionPoint
,BuildableItem
,Describable<TopLevelItem>
,DescriptorByNameOwner
,Item
,ModelObject
,PersistenceRoot
,Queue.FlyweightTask
,SubTask
,Queue.Task
,ResourceActivity
,Saveable
,TopLevelItem
,SearchableModelObject
,SearchItem
,AccessControlled
,LazyBuildMixIn.LazyLoadingJob<WorkflowJob,
,WorkflowRun> Loadable
,ModelObjectWithChildren
,ModelObjectWithContextMenu
,ParameterizedJobMixIn.ParameterizedJob<WorkflowJob,
,WorkflowRun> SCMTriggerItem
,TriggeredItem
,OnMaster
,HasWidgets
,org.jenkinsci.plugins.workflow.flow.BlockableResume
,org.kohsuke.stapler.HttpDeletable
,org.kohsuke.stapler.StaplerOverridable
,org.kohsuke.stapler.StaplerProxy
public final class WorkflowJob
extends Job<WorkflowJob,WorkflowRun>
implements LazyBuildMixIn.LazyLoadingJob<WorkflowJob,WorkflowRun>, ParameterizedJobMixIn.ParameterizedJob<WorkflowJob,WorkflowRun>, TopLevelItem, Queue.FlyweightTask, SCMTriggerItem, org.jenkinsci.plugins.workflow.flow.BlockableResume
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
static final class
Nested classes/interfaces inherited from class hudson.model.Job
Job.LastItemListener, Job.SubItemBuildsLocationImpl
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
Nested classes/interfaces inherited from interface org.kohsuke.stapler.HttpDeletable
org.kohsuke.stapler.HttpDeletable.HttpDeletableDispatcher
Nested classes/interfaces inherited from interface jenkins.model.ModelObjectWithContextMenu
ModelObjectWithContextMenu.ContextMenu, ModelObjectWithContextMenu.ContextMenuVisibility, ModelObjectWithContextMenu.MenuItem, ModelObjectWithContextMenu.MenuItemType
Nested classes/interfaces inherited from interface jenkins.triggers.SCMTriggerItem
SCMTriggerItem.SCMTriggerItems
-
Field Summary
Fields inherited from class hudson.model.Job
HISTORY_ADAPTER, nextBuildNumber, properties, runIdMigrator
Fields inherited from class hudson.model.AbstractItem
description, displayName, name, PRONOUN, SKIP_PERMISSION_CHECK, TASK_NOUN
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected RunMap<WorkflowRun>
_getRuns()
void
void
addProperty
(JobProperty jobProp) void
addTrigger
(Trigger trigger) void
static void
alias()
asItem()
getACL()
Deprecated.getBuildByNumber
(int n) org.jenkinsci.plugins.workflow.flow.FlowDefinition
protected List<WorkflowRun>
boolean
getNearestBuild
(int n) getNearestOldBuild
(int n) int
Collection<? extends SCM>
getSCMs()
Collection<? extends SubTask>
boolean
boolean
boolean
boolean
boolean
protected SearchIndexBuilder
void
void
protected void
poll
(TaskListener listener) void
removeProperty
(JobProperty jobProperty) protected void
removeRun
(WorkflowRun run) void
scheduleBuild2
(int quietPeriod, Action... actions) void
setConcurrentBuild
(boolean b) void
setDefinition
(org.jenkinsci.plugins.workflow.flow.FlowDefinition definition) void
setDisabled
(boolean disabled) void
setQuietPeriod
(Integer seconds) void
setResumeBlocked
(boolean resumeBlocked) void
setTriggers
(List<Trigger<?>> inputTriggers) protected void
submit
(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) boolean
Methods inherited from class hudson.model.Job
assignBuildNumber, checkRename, createHistoryWidget, delete, doBuildStatus, doChildrenContextMenu, doChildrenContextMenu, doConfigSubmit, doDescription, doDoRename, doRssAll, doRssChangelog, doRssFailed, fastUpdateNextBuildNumber, getAllJobs, getAllProperties, getBuildDir, getBuildDiscarder, getBuildForCLI, getBuildHealth, getBuildHealthReports, getBuilds, getBuilds, getBuildsAsMap, getBuildsByTimestamp, getBuildStatusIconClassName, getBuildStatusUrl, getBuildTimeGraph, getCharacteristicEnvVars, getDynamic, getDynamic, getEnvironment, getEstimatedDuration, getLastBuildsOverThreshold, getLastCompletedBuild, getLastFailedBuild, getLastStableBuild, getLastSuccessfulBuild, getLastUnstableBuild, getLastUnsuccessfulBuild, getLogRotator, getNewBuilds, getNextBuildNumber, getOverrides, getPermalinks, getProperties, getProperty, getProperty, getTimeline, isBuilding, isHoldOffBuildUntilSave, isKeepDependencies, isLogUpdated, isNameEditable, logRotate, movedTo, onCopiedFrom, removeProperty, renameTo, save, saveNextBuildNumber, setBuildDiscarder, setLogRotator, submit, supportsLogRotator, updateNextBuildNumber
Methods inherited from class hudson.model.AbstractItem
delete, delete, doCheckNewName, doConfigDotXml, doConfigDotXml, doConfirmRename, doDoDelete, doDoDelete, doReload, doSetName, doSubmitDescription, doSubmitDescription, getAbsoluteUrl, getApi, getConfigFile, getDescription, getDisplayName, getDisplayNameOrNull, getFullDisplayName, getFullName, getName, getParent, getRelativeDisplayNameFrom, getRelativeNameFromGroup, getRootDir, getSearchName, getSearchUrl, getShortUrl, getTarget, getTaskNoun, getUrl, load, resolveForCLI, setDescription, setDisplayName, setDisplayNameOrNull, toString, updateByXml, updateByXml, writeConfigDotXml, writeReplace
Methods inherited from class hudson.model.Actionable
addOrReplaceAction, doContextMenu, doContextMenu, getAction, getAction, getActions, getActions, getAllActions, removeAction, removeActions, replaceActions
Methods inherited from class hudson.model.AbstractModelObject
getSearch, getSearchIndex, requirePOST, sendError, sendError, sendError, 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.security.AccessControlled
checkAnyPermission, checkPermission, hasAnyPermission, hasPermission, hasPermission, hasPermission2
Methods inherited from interface hudson.model.BuildableItem
scheduleBuild, scheduleBuild
Methods inherited from interface hudson.model.DescriptorByNameOwner
getDescriptorByName
Methods inherited from interface jenkins.widgets.HasWidgets
getWidget, getWidgets
Methods inherited from interface hudson.model.Item
delete, getAbsoluteUrl, getAllJobs, getDisplayName, getFullDisplayName, getFullName, getName, getParent, getRelativeNameFrom, getRelativeNameFrom, getShortUrl, getUrl, onCopiedFrom, save
Methods inherited from interface jenkins.model.ParameterizedJobMixIn.ParameterizedJob
createExecutable, doBuild, doBuild, doBuildWithParameters, doBuildWithParameters, doCancelQueue, doDisable, doEnable, doPolling, getBuildNowText, getParameterizedJobMixIn, isParameterized, makeDisabled, scheduleBuild, scheduleBuild
Methods inherited from interface hudson.model.PersistenceRoot
getRootDir
Methods inherited from interface hudson.model.Queue.Task
checkAbortPermission, getAffinityKey, getDefaultAuthentication, getDefaultAuthentication, getDefaultAuthentication2, getDefaultAuthentication2, getFullDisplayName, getName, getUrl, getWhyBlocked, hasAbortPermission, isBuildBlocked
Methods inherited from interface hudson.model.ResourceActivity
getDisplayName, getResourceList
Methods inherited from interface jenkins.triggers.SCMTriggerItem
getNextBuildNumber, schedulePolling
Methods inherited from interface hudson.search.SearchableModelObject
getSearch
Methods inherited from interface hudson.search.SearchItem
getSearchIndex, getSearchName, getSearchUrl
Methods inherited from interface hudson.model.queue.SubTask
getEstimatedDuration, getOwnerExecutable, getOwnerTask
-
Field Details
-
ABORT
Deprecated.Just useItem.CANCEL
.
-
-
Constructor Details
-
WorkflowJob
-
-
Method Details
-
onCreatedFromScratch
public void onCreatedFromScratch()- Specified by:
onCreatedFromScratch
in interfaceItem
- Overrides:
onCreatedFromScratch
in classJob<WorkflowJob,
WorkflowRun>
-
onLoad
- Specified by:
onLoad
in interfaceItem
- Overrides:
onLoad
in classJob<WorkflowJob,
WorkflowRun> - Throws:
IOException
-
getDefinition
public org.jenkinsci.plugins.workflow.flow.FlowDefinition getDefinition() -
setDefinition
public void setDefinition(org.jenkinsci.plugins.workflow.flow.FlowDefinition definition) -
submit
protected void submit(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) throws IOException, jakarta.servlet.ServletException, Descriptor.FormException - Overrides:
submit
in classJob<WorkflowJob,
WorkflowRun> - Throws:
IOException
jakarta.servlet.ServletException
Descriptor.FormException
-
addProperty
- Overrides:
addProperty
in classJob<WorkflowJob,
WorkflowRun> - Throws:
IOException
-
isBuildable
public boolean isBuildable()- Specified by:
isBuildable
in interfaceParameterizedJobMixIn.ParameterizedJob<WorkflowJob,
WorkflowRun> - Specified by:
isBuildable
in classJob<WorkflowJob,
WorkflowRun>
-
_getRuns
- Specified by:
_getRuns
in classJob<WorkflowJob,
WorkflowRun>
-
getLazyBuildMixIn
- Specified by:
getLazyBuildMixIn
in interfaceLazyBuildMixIn.LazyLoadingJob<WorkflowJob,
WorkflowRun>
-
removeRun
- Specified by:
removeRun
in classJob<WorkflowJob,
WorkflowRun>
-
getBuild
Deprecated.- Overrides:
getBuild
in classJob<WorkflowJob,
WorkflowRun>
-
getBuildByNumber
- Overrides:
getBuildByNumber
in classJob<WorkflowJob,
WorkflowRun>
-
getFirstBuild
- Overrides:
getFirstBuild
in classJob<WorkflowJob,
WorkflowRun>
-
getLastBuild
- Overrides:
getLastBuild
in classJob<WorkflowJob,
WorkflowRun>
-
getNearestBuild
- Overrides:
getNearestBuild
in classJob<WorkflowJob,
WorkflowRun>
-
getNearestOldBuild
- Overrides:
getNearestOldBuild
in classJob<WorkflowJob,
WorkflowRun>
-
getEstimatedDurationCandidates
- Overrides:
getEstimatedDurationCandidates
in classJob<WorkflowJob,
WorkflowRun>
-
scheduleBuild2
@CheckForNull public QueueTaskFuture<WorkflowRun> scheduleBuild2(int quietPeriod, Action... actions) - Specified by:
scheduleBuild2
in interfaceParameterizedJobMixIn.ParameterizedJob<WorkflowJob,
WorkflowRun> - Specified by:
scheduleBuild2
in interfaceSCMTriggerItem
-
makeSearchIndex
- Overrides:
makeSearchIndex
in classJob<WorkflowJob,
WorkflowRun>
-
isDisabled
public boolean isDisabled()- Specified by:
isDisabled
in interfaceParameterizedJobMixIn.ParameterizedJob<WorkflowJob,
WorkflowRun>
-
setDisabled
@Restricted(org.kohsuke.accmod.restrictions.DoNotUse.class) public void setDisabled(boolean disabled) - Specified by:
setDisabled
in interfaceParameterizedJobMixIn.ParameterizedJob<WorkflowJob,
WorkflowRun>
-
supportsMakeDisabled
public boolean supportsMakeDisabled()- Specified by:
supportsMakeDisabled
in interfaceParameterizedJobMixIn.ParameterizedJob<WorkflowJob,
WorkflowRun>
-
getIconColor
- Overrides:
getIconColor
in classJob<WorkflowJob,
WorkflowRun>
-
getAuthToken
- Specified by:
getAuthToken
in interfaceParameterizedJobMixIn.ParameterizedJob<WorkflowJob,
WorkflowRun>
-
getQuietPeriod
public int getQuietPeriod()- Specified by:
getQuietPeriod
in interfaceParameterizedJobMixIn.ParameterizedJob<WorkflowJob,
WorkflowRun> - Specified by:
getQuietPeriod
in interfaceSCMTriggerItem
-
getHasCustomQuietPeriod
@Restricted(org.kohsuke.accmod.restrictions.DoNotUse.class) public boolean getHasCustomQuietPeriod() -
setQuietPeriod
- Throws:
IOException
-
isInQueue
@Exported public boolean isInQueue()- Overrides:
isInQueue
in classJob<WorkflowJob,
WorkflowRun>
-
getQueueItem
- Overrides:
getQueueItem
in classJob<WorkflowJob,
WorkflowRun>
-
getCauseOfBlockage
- Specified by:
getCauseOfBlockage
in interfaceQueue.Task
-
isConcurrentBuild
@Exported public boolean isConcurrentBuild()- Specified by:
isConcurrentBuild
in interfaceQueue.Task
-
isResumeBlocked
@Exported public boolean isResumeBlocked()- Specified by:
isResumeBlocked
in interfaceorg.jenkinsci.plugins.workflow.flow.BlockableResume
-
setResumeBlocked
public void setResumeBlocked(boolean resumeBlocked) - Specified by:
setResumeBlocked
in interfaceorg.jenkinsci.plugins.workflow.flow.BlockableResume
-
setConcurrentBuild
- Throws:
IOException
-
getACL
- Specified by:
getACL
in interfaceAccessControlled
- Overrides:
getACL
in classJob<WorkflowJob,
WorkflowRun>
-
getSubTasks
- Specified by:
getSubTasks
in interfaceQueue.Task
-
getAssignedLabel
- Specified by:
getAssignedLabel
in interfaceSubTask
-
getLastBuiltOn
- Specified by:
getLastBuiltOn
in interfaceSubTask
-
getSameNodeConstraint
- Specified by:
getSameNodeConstraint
in interfaceSubTask
-
getPronoun
- Overrides:
getPronoun
in classJob<WorkflowJob,
WorkflowRun>
-
getDescriptor
- Specified by:
getDescriptor
in interfaceDescribable<TopLevelItem>
- Specified by:
getDescriptor
in interfaceTopLevelItem
-
getTriggers
- Specified by:
getTriggers
in interfaceTriggeredItem
-
getTriggersJobProperty
-
addTriggersJobPropertyWithoutStart
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public void addTriggersJobPropertyWithoutStart(PipelineTriggersJobProperty prop) throws IOException - Throws:
IOException
-
setTriggers
- Throws:
IOException
-
addTrigger
- Throws:
IOException
-
removeProperty
- Overrides:
removeProperty
in classJob<WorkflowJob,
WorkflowRun> - Throws:
IOException
-
addAction
- Overrides:
addAction
in classActionable
-
replaceAction
- Overrides:
replaceAction
in classActionable
-
asItem
- Specified by:
asItem
in interfaceSCMTriggerItem
-
getSCMTrigger
- Specified by:
getSCMTrigger
in interfaceSCMTriggerItem
-
getSCMs
- Specified by:
getSCMs
in interfaceSCMTriggerItem
-
getTypicalSCM
-
poll
- Specified by:
poll
in interfaceSCMTriggerItem
-
performDelete
- Overrides:
performDelete
in classAbstractItem
- Throws:
IOException
InterruptedException
-
alias
-
Item.CANCEL
.