|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthudson.model.AbstractModelObject
hudson.model.Actionable
hudson.model.AbstractItem
hudson.model.Job<P,R>
hudson.model.AbstractProject<P,R>
public abstract class AbstractProject<P extends AbstractProject<P,R>,R extends AbstractBuild<P,R>>
Base implementation of Jobs that build software.
For now this is primarily the common part of Project and MavenModule.
AbstractBuild| Nested Class Summary | |
|---|---|
static class |
AbstractProject.AbstractProjectDescriptor
AbstractProject subtypes should implement this base class as a
descriptor. |
static class |
AbstractProject.BecauseOfBuildInProgress
Blocked because the previous build is already in progress. |
static class |
AbstractProject.BecauseOfDownstreamBuildInProgress
Because the downstream build is in progress, and we are configured to wait for that. |
static class |
AbstractProject.BecauseOfUpstreamBuildInProgress
Because the upstream build is in progress, and we are configured to wait for that. |
| Nested classes/interfaces inherited from interface hudson.ExtensionPoint |
|---|
ExtensionPoint.LegacyInstancesAreScopedToHudson |
| Field Summary | |
|---|---|
static Permission |
ABORT
Permission to abort a build. |
static String |
AFFINITY_CHO0SER_KEY
|
static String |
APPOINTED_NODE_PROPERTY_NAME
|
static String |
ASSIGNED_LABEL_KEY
|
static String |
BASIC_KEY
|
static String |
BLOCK_BUILD_WHEN_DOWNSTREAM_BUILDING_PROPERTY_NAME
|
static String |
BLOCK_BUILD_WHEN_UPSTREAM_BUILDING_PROPERTY_NAME
|
static String |
BUILD_TRIGGER_PROPERTY_NAME
|
static String |
CLEAN_WORKSPACE_REQUIRED_PROPERTY_NAME
|
static String |
CONCURRENT_BUILD_PROPERTY_NAME
|
static String |
CUSTOM_WORKSPACE_PROPERTY_NAME
|
static String |
HAS_QUIET_PERIOD_PROPERTY_NAME
|
static String |
HAS_SCM_CHECKOUT_RETRY_COUNT_PROPERTY_NAME
|
static String |
JDK_PROPERTY_NAME
|
static String |
QUIET_PERIOD_PROPERTY_NAME
|
static String |
SCM_CHECKOUT_RETRY_COUNT_PROPERTY_NAME
|
static String |
SCM_PROPERTY_NAME
|
static String |
SLAVE_KEY
|
| Fields inherited from class hudson.model.Job |
|---|
LOG_ROTATOR_PROPERTY_NAME, PARAMETERS_DEFINITION_JOB_PROPERTY_PROPERTY_NAME, PROPERTY_NAME_SEPARATOR |
| Fields inherited from interface hudson.model.Item |
|---|
BUILD, CONFIGURE, CREATE, DELETE, EXTENDED_READ, PERMISSIONS, READ, WIPEOUT, WORKSPACE |
| Fields inherited from interface hudson.model.Saveable |
|---|
NOOP |
| Method Summary | ||
|---|---|---|
SortedMap<Integer,? extends R> |
_getRuns()
Gets all the runs. |
|
void |
addProperty(JobProperty<? super P> jobProp)
Adds JobProperty. |
|
void |
addTrigger(Trigger<?> trigger)
Adds a new Trigger to this Project if not active yet. |
|
boolean |
blockBuildWhenDownstreamBuilding()
Indicates whether build should be blocked while downstream project is building. |
|
boolean |
blockBuildWhenUpstreamBuilding()
Indicates whether build should be blocked while upstream project is building. |
|
void |
checkAbortPermission()
Checks the permission to see if the current user can abort this executable. |
|
boolean |
checkout(AbstractBuild build,
Launcher launcher,
BuildListener listener,
File changelogFile)
|
|
boolean |
cleanWorkspace()
Cleans project workspace. |
|
R |
createExecutable()
Creates Queue.Executable, which performs the actual execution of the
task. |
|
void |
disable()
|
|
void |
doBuild(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
Schedules a new build command. |
|
void |
doBuildWithParameters(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
Supports build trigger with parameters via an HTTP GET or POST. |
|
void |
doCancelQueue(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
Cancels a scheduled build. |
|
FormValidation |
doCheckRetryCount(String value)
Validates the retry count Regex |
|
void |
doConfigSubmit(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
Accepts submission from the configuration page. |
|
org.kohsuke.stapler.HttpResponse |
doDisable()
|
|
org.kohsuke.stapler.HttpResponse |
doDoWipeOutWorkspace()
Wipes out the workspace. |
|
org.kohsuke.stapler.HttpResponse |
doEnable()
|
|
void |
doPolling(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
Schedules a new SCM polling command. |
|
void |
doRssChangelog(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
RSS feed for changes in this project. |
|
DirectoryBrowserSupport |
doWs(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
Serves the workspace files. |
|
void |
enable()
|
|
static AbstractProject |
findNearest(String name)
Finds a AbstractProject that has the name closest to the given
name. |
|
List<Action> |
getActions()
Gets actions contributed to this build. |
|
AppointedNode |
getAppointedNode()
Returns AppointedNode. |
|
Label |
getAssignedLabel()
If this project is configured to be always built on this node, return that Node. |
|
String |
getAssignedLabelString()
Gets the textual representation of the assigned label as it was entered by the user. |
|
BuildAuthorizationToken |
getAuthToken()
|
|
List<AbstractProject> |
getBuildTriggerUpstreamProjects()
Returns only those upstream projects that defines BuildTrigger to
this project. |
|
CauseOfBlockage |
getCauseOfBlockage()
If the execution of this task should be blocked for temporary reasons, this method returns a non-null object explaining why. |
|
int |
getDelay(org.kohsuke.stapler.StaplerRequest req)
Computes the delay by taking the default value and the override in the request parameter into the account. |
|
List<AbstractProject> |
getDownstreamProjects()
Gets the other AbstractProjects that should be built when a build
of this project is completed. |
|
boolean |
getHasCustomQuietPeriod()
Deprecated. as of 2.1.2 This method was used only on UI side. No longer required. |
|
BallColor |
getIconColor()
Used as the color of the status ball for the project. |
|
JDK |
getJDK()
|
|
String |
getJDKName()
|
|
Node |
getLastBuiltOn()
Gets the Node where this project was last built on. |
|
FilePath |
getModuleRoot()
Deprecated. as of 1.319 See getWorkspace() for a migration
strategy. |
|
FilePath[] |
getModuleRoots()
Deprecated. as of 1.319 See getWorkspace() for a migration
strategy. |
|
Queue.Task |
getOwnerTask()
Gets the Queue.Task that this subtask belongs to. |
|
List<ProminentProjectAction> |
getProminentActions()
|
|
String |
getPronoun()
Get the term used in the UI to represent this kind of AbstractProject. |
|
abstract DescribableList<Publisher,Descriptor<Publisher>> |
getPublishersList()
Returns the live list of all Publishers configured for this
project. |
|
Queue.Item |
getQueueItem()
|
|
int |
getQuietPeriod()
Returns project quiet period. |
|
SortedMap<Integer,Fingerprint.RangeSet> |
getRelationship(AbstractProject that)
Gets the dependency relationship map between this project (as the source) and that project (as the sink.) |
|
ResourceList |
getResourceList()
List of necessary resources to perform the build of this project. |
|
AbstractProject |
getRootProject()
Returns the root project value. |
|
Object |
getSameNodeConstraint()
If a subset of SubTasks of a Queue.Task needs to be collocated
with other SubTasks, those SubTasks should return the
equal object here. |
|
SCM |
getScm()
Returns configured SCM for project, |
|
int |
getScmCheckoutRetryCount()
Returns scm checkout retry count. |
|
R |
getSomeBuildWithWorkspace()
Gets some build that has a live workspace. |
|
FilePath |
getSomeWorkspace()
Gets a workspace for some build of this project. |
|
List<SubTask> |
getSubTasks()
Obtains the SubTasks that constitute this task. |
|
Set<AbstractProject> |
getTransitiveDownstreamProjects()
Gets all the downstream projects including transitive downstream projects. |
|
Set<AbstractProject> |
getTransitiveUpstreamProjects()
Gets all the upstream projects including transitive upstream projects. |
|
|
getTrigger(Class<T> clazz)
Gets the specific trigger, or null if the propert is not configured for this job. |
|
DescribableList<Trigger<?>,TriggerDescriptor> |
getTriggerDescribableList()
|
|
Map<TriggerDescriptor,Trigger> |
getTriggers()
Returns map of triggers. |
|
List<Trigger<?>> |
getTriggersList()
|
|
List<AbstractProject> |
getUpstreamProjects()
|
|
String |
getWhyBlocked()
|
|
FilePath |
getWorkspace()
Deprecated. as of 1.319 To support concurrent builds of the same project, this method is moved to AbstractBuild. For backward
compatibility, this method returns the right
AbstractBuild.getWorkspace() if called from Executor, and
otherwise the workspace of the last build.
If you are calling this method during a build from an executor,
switch it to |
|
Resource |
getWorkspaceResource()
Deprecated. as of 1.319 Projects no longer have a fixed workspace, ands builds will find an available workspace via WorkspaceList for
each build (furthermore, that happens after a build is started.) So a
Resource representation for a workspace at the project level no
longer makes sense.
If you need to lock a workspace while you do some computation, see
the source code of |
|
boolean |
hasAbortPermission()
Works just like Queue.Task.checkAbortPermission() except it indicates
the status by a return value, instead of exception. |
|
boolean |
hasCustomScmCheckoutRetryCount()
Deprecated. as of 2.1.2 |
|
boolean |
hasParticipant(User user)
Returns true if this user has made a commit to this project. |
|
boolean |
isAdvancedAffinityChooser()
Gets whether this project is using the advanced affinity chooser UI. |
|
boolean |
isBuildable()
Returns true if we should display "build now" icon |
|
boolean |
isBuildBlocked()
Returns true if the execution should be blocked for temporary reasons. |
|
boolean |
isCleanWorkspaceRequired()
Checks whether workspace should be cleaned before build |
|
boolean |
isConcurrentBuild()
Does this project perform concurrent builds? |
|
boolean |
isConfigurable()
Used in sidepanel.jelly to decide whether to display the config/delete/build links. |
|
boolean |
isDisabled()
|
|
abstract boolean |
isFingerprintConfigured()
True if the builds of this project produces Fingerprint records. |
|
boolean |
isInQueue()
Returns true if the build is in the queue. |
|
boolean |
isParameterized()
|
|
void |
makeDisabled(boolean b)
Marks the build as disabled. |
|
void |
onCreatedFromScratch()
When an item is created from scratch (instead of copied), this method will be invoked. |
|
void |
onLoad(ItemGroup<? extends Item> parent,
String name)
Called right after when a Item is loaded from disk. |
|
PollingResult |
poll(TaskListener listener)
Checks if there's any update in SCM, and returns true if any is found. |
|
boolean |
pollSCMChanges(TaskListener listener)
Deprecated. as of 1.346 Use poll(TaskListener) instead. |
|
void |
removeRun(R run)
Called from Run to remove it from this job. |
|
void |
removeTrigger(TriggerDescriptor trigger)
Removes Trigger frin this Project by
TriggerDescriptor. |
|
static AbstractProject |
resolveForCLI(String name)
Used for CLI binding. |
|
boolean |
scheduleBuild()
Deprecated. Use scheduleBuild(Cause). Since 1.283 |
|
boolean |
scheduleBuild(Cause c)
Schedules a build of this project. |
|
boolean |
scheduleBuild(int quietPeriod)
Deprecated. Use scheduleBuild(int, Cause). Since 1.283 |
|
boolean |
scheduleBuild(int quietPeriod,
Cause c)
|
|
boolean |
scheduleBuild(int quietPeriod,
Cause c,
Action... actions)
Schedules a build. |
|
Future<R> |
scheduleBuild2(int quietPeriod)
Schedules a build, and returns a Future object to wait for the
completion of the build. |
|
Future<R> |
scheduleBuild2(int quietPeriod,
Cause c)
Schedules a build of this project, and returns a Future object to
wait for the completion of the build. |
|
Future<R> |
scheduleBuild2(int quietPeriod,
Cause c,
Action... actions)
Schedules a build of this project, and returns a Future object to
wait for the completion of the build. |
|
Future<R> |
scheduleBuild2(int quietPeriod,
Cause c,
Collection<? extends Action> actions)
Schedules a build of this project, and returns a Future object to
wait for the completion of the build. |
|
boolean |
schedulePolling()
Schedules a polling of this project. |
|
void |
setAdvancedAffinityChooser(boolean b)
Sets whether this project is using the advanced affinity chooser UI. |
|
void |
setAppointedNode(AppointedNode appointedNode)
Sets AppointedNode. |
|
void |
setAssignedLabel(Label label)
Sets the assigned label. |
|
void |
setAssignedNode(Node node)
Assigns this job to the given node. |
|
void |
setBlockBuildWhenDownstreamBuilding(boolean b)
Sets blockBuildWhenDownstreamBuilding flag. |
|
void |
setBlockBuildWhenUpstreamBuilding(boolean b)
Sets blockBuildWhenUpstreamBuilding flag. |
|
void |
setCleanWorkspaceRequired(boolean cleanWorkspaceRequired)
Sets cleanWorkspaceRequired flag. |
|
void |
setConcurrentBuild(boolean b)
|
|
void |
setJDK(JDK jdk)
Overwrites the JDK setting. |
|
void |
setJDK(String jdk)
Overwrites the JDK setting. |
|
void |
setQuietPeriod(Integer seconds)
Sets the custom quiet period of this project, or revert to the global default if null is given. |
|
void |
setScm(SCM scm)
Sets scm value. |
|
void |
setScmCheckoutRetryCount(Integer retryCount)
|
|
void |
setTriggers(List<Trigger<?>> triggerList)
Sets list of triggers. |
|
| Methods inherited from class hudson.model.AbstractItem |
|---|
checkPermission, delete, delete, doConfigDotXml, doDoDelete, doSubmitDescription, getAbsoluteUrl, getApi, getConfigFile, getDescription, getDescriptorByName, getDisplayName, getFullDisplayName, getFullName, getName, getParent, getRootDir, getSearchUrl, getShortUrl, getUrl, hasPermission, setDescription, toString |
| Methods inherited from class hudson.model.Actionable |
|---|
addAction, getAction, getAction, getActions |
| Methods inherited from class hudson.model.AbstractModelObject |
|---|
getSearch, getSearchIndex, getSearchName |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface hudson.model.Queue.Task |
|---|
getFullDisplayName, getName, getUrl |
| Methods inherited from interface hudson.model.queue.SubTask |
|---|
getEstimatedDuration |
| Methods inherited from interface hudson.model.ResourceActivity |
|---|
getDisplayName |
| Methods inherited from interface hudson.model.Item |
|---|
delete, getAbsoluteUrl, getAllJobs, getDisplayName, getFullDisplayName, getFullName, getName, getParent, getShortUrl, getUrl, onCopiedFrom, save |
| Methods inherited from interface hudson.model.PersistenceRoot |
|---|
getRootDir |
| Methods inherited from interface hudson.search.SearchableModelObject |
|---|
getSearch |
| Methods inherited from interface hudson.search.SearchItem |
|---|
getSearchIndex, getSearchName, getSearchUrl |
| Methods inherited from interface hudson.security.AccessControlled |
|---|
checkPermission, getACL, hasPermission |
| Field Detail |
|---|
public static final String CONCURRENT_BUILD_PROPERTY_NAME
public static final String CLEAN_WORKSPACE_REQUIRED_PROPERTY_NAME
public static final String BLOCK_BUILD_WHEN_DOWNSTREAM_BUILDING_PROPERTY_NAME
public static final String BLOCK_BUILD_WHEN_UPSTREAM_BUILDING_PROPERTY_NAME
public static final String QUIET_PERIOD_PROPERTY_NAME
public static final String SCM_CHECKOUT_RETRY_COUNT_PROPERTY_NAME
public static final String CUSTOM_WORKSPACE_PROPERTY_NAME
public static final String JDK_PROPERTY_NAME
public static final String SCM_PROPERTY_NAME
public static final String HAS_QUIET_PERIOD_PROPERTY_NAME
public static final String HAS_SCM_CHECKOUT_RETRY_COUNT_PROPERTY_NAME
public static final String BUILD_TRIGGER_PROPERTY_NAME
public static final String APPOINTED_NODE_PROPERTY_NAME
public static final String BASIC_KEY
public static final String AFFINITY_CHO0SER_KEY
public static final String SLAVE_KEY
public static final String ASSIGNED_LABEL_KEY
public static final Permission ABORT
Item.BUILD
| Method Detail |
|---|
public void onCreatedFromScratch()
Item
onCreatedFromScratch in interface ItemonCreatedFromScratch in class AbstractItem
public void onLoad(ItemGroup<? extends Item> parent,
String name)
throws IOException
AbstractItemItem is loaded from disk. This is an
opporunity to do a post load processing.
onLoad in interface ItemonLoad in class Job<P extends AbstractProject<P,R>,R extends AbstractBuild<P,R>>name - Name of the directory (not a path --- just the name portion)
from which the configuration was loaded. This usually becomes the
name of this item.
IOException@Exported public boolean isConcurrentBuild()
isConcurrentBuild in interface Queue.Task
public void setConcurrentBuild(boolean b)
throws IOException
IOExceptionpublic boolean isCleanWorkspaceRequired()
IAbstractProject
isCleanWorkspaceRequired in interface IAbstractProjectpublic void setCleanWorkspaceRequired(boolean cleanWorkspaceRequired)
IAbstractProject
setCleanWorkspaceRequired in interface IAbstractProjectcleanWorkspaceRequired - true - to always clean workspace.public Label getAssignedLabel()
Node. Otherwise null.
getAssignedLabel in interface SubTaskgetAssignedLabel in interface IAbstractProjectLabel instance.public String getAssignedLabelString()
getAssignedLabelString in interface IAbstractProject
public void setAssignedLabel(Label label)
throws IOException
setAssignedLabel in interface IAbstractProjectlabel - node label.
IOException - exception.
public void setAssignedNode(Node node)
throws IOException
setAssignedLabel(Label).
setAssignedNode in interface IAbstractProjectnode - node.
IOException - exceptionpublic boolean isAdvancedAffinityChooser()
isAdvancedAffinityChooser in interface IAbstractProject
public void setAdvancedAffinityChooser(boolean b)
throws IOException
setAdvancedAffinityChooser in interface IAbstractProjectb - true - advanced chooser, false - otherwise
IOException - exception.public void setAppointedNode(AppointedNode appointedNode)
AppointedNode.
setAppointedNode in interface IAbstractProjectappointedNode - AppointedNode.public AppointedNode getAppointedNode()
AppointedNode. Returned value is not null.
getAppointedNode in interface IAbstractProjectAppointedNode.public String getPronoun()
AbstractProject. Must start with a capital letter.
getPronoun in class Job<P extends AbstractProject<P,R>,R extends AbstractBuild<P,R>>public AbstractProject getRootProject()
getRootProject in interface IAbstractProjectpublic final FilePath getWorkspace()
AbstractBuild. For backward
compatibility, this method returns the right
AbstractBuild.getWorkspace() if called from Executor, and
otherwise the workspace of the last build.
If you are calling this method during a build from an executor,
switch it to AbstractBuild.getWorkspace(). If you are calling
this method to serve a file from the workspace, doing a form validation,
etc., then use getSomeWorkspace()
public final FilePath getSomeWorkspace()
This is useful for obtaining a workspace for the purpose of form field validation, where exactly which build the workspace belonged is less important. The implementation makes a cursory effort to find some workspace.
getSomeWorkspace in interface IAbstractProjectpublic final R getSomeBuildWithWorkspace()
getSomeBuildWithWorkspace in interface IAbstractProjectpublic FilePath getModuleRoot()
getWorkspace() for a migration
strategy.
This is usually where pom.xml, build.xml and so on exists.
public FilePath[] getModuleRoots()
getWorkspace() for a migration
strategy.
Some SCMs support checking out multiple modules into the same workspace. In these cases, the returned array will have a length greater than one.
public int getQuietPeriod()
IAbstractProject
getQuietPeriod in interface IAbstractProject
public void setQuietPeriod(Integer seconds)
throws IOException
setQuietPeriod in interface IAbstractProjectseconds - quiet period
IOException - if any.public int getScmCheckoutRetryCount()
IAbstractProject
getScmCheckoutRetryCount in interface IAbstractProjectpublic void setScmCheckoutRetryCount(Integer retryCount)
public boolean getHasCustomQuietPeriod()
public boolean hasCustomScmCheckoutRetryCount()
public boolean isBuildable()
Job
isBuildable in interface IJobisBuildable in class Job<P extends AbstractProject<P,R>,R extends AbstractBuild<P,R>>public boolean isConfigurable()
isConfigurable in interface IAbstractProjectpublic boolean blockBuildWhenDownstreamBuilding()
IAbstractProject
blockBuildWhenDownstreamBuilding in interface IAbstractProject
public void setBlockBuildWhenDownstreamBuilding(boolean b)
throws IOException
IAbstractProject
setBlockBuildWhenDownstreamBuilding in interface IAbstractProjectb - new boolean value.
IOException - if any.public boolean blockBuildWhenUpstreamBuilding()
IAbstractProject
blockBuildWhenUpstreamBuilding in interface IAbstractProject
public void setBlockBuildWhenUpstreamBuilding(boolean b)
throws IOException
IAbstractProject
setBlockBuildWhenUpstreamBuilding in interface IAbstractProjectb - new boolean value.
IOException - if any.public boolean isDisabled()
isDisabled in interface IAbstractProject
public FormValidation doCheckRetryCount(@QueryParameter
String value)
throws IOException,
javax.servlet.ServletException
IOException
javax.servlet.ServletException
public void makeDisabled(boolean b)
throws IOException
makeDisabled in interface IAbstractProjectb - true - to disable project, false - enable.
IOException - if any.
public void disable()
throws IOException
IOException
public void enable()
throws IOException
IOExceptionpublic BallColor getIconColor()
Job
getIconColor in interface IJobgetIconColor in class Job<P extends AbstractProject<P,R>,R extends AbstractBuild<P,R>>public abstract DescribableList<Publisher,Descriptor<Publisher>> getPublishersList()
Publishers configured for this
project.
This method couldn't be called getPublishers() because existing methods in sub-classes return different inconsistent types.
public void addProperty(JobProperty<? super P> jobProp)
throws IOException
JobJobProperty.
addProperty in class Job<P extends AbstractProject<P,R>,R extends AbstractBuild<P,R>>IOExceptionpublic List<ProminentProjectAction> getProminentActions()
getProminentActions in interface IAbstractProjectProminentProjectActions for current project.
public void doConfigSubmit(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
throws IOException,
javax.servlet.ServletException,
Descriptor.FormException
Job
doConfigSubmit in class Job<P extends AbstractProject<P,R>,R extends AbstractBuild<P,R>>IOException
javax.servlet.ServletException
Descriptor.FormExceptionpublic boolean scheduleBuild()
scheduleBuild(Cause). Since 1.283
scheduleBuild in interface BuildableItempublic boolean scheduleBuild(int quietPeriod)
scheduleBuild(int, Cause). Since 1.283
scheduleBuild in interface BuildableItempublic boolean scheduleBuild(Cause c)
scheduleBuild in interface BuildableItem
public boolean scheduleBuild(int quietPeriod,
Cause c)
scheduleBuild in interface BuildableItem
public boolean scheduleBuild(int quietPeriod,
Cause c,
Action... actions)
quietPeriod - the quiet period to observerc - the cause for this build which should be recordedactions - a list of Actions that will be added to the build
public Future<R> scheduleBuild2(int quietPeriod,
Cause c,
Action... actions)
Future object to
wait for the completion of the build.
actions - For the convenience of the caller, this array can contain
null, and those will be silently ignored.
public Future<R> scheduleBuild2(int quietPeriod,
Cause c,
Collection<? extends Action> actions)
Future object to
wait for the completion of the build.
actions - For the convenience of the caller, this collection can
contain null, and those will be silently ignored.public Future<R> scheduleBuild2(int quietPeriod)
Future object to wait for the
completion of the build.
Production code shouldn't be using this, but for tests this is very convenient, so this isn't marked as deprecated.
public Future<R> scheduleBuild2(int quietPeriod,
Cause c)
Future object to
wait for the completion of the build.
public boolean schedulePolling()
public boolean isInQueue()
isInQueue in interface IJobisInQueue in class Job<P extends AbstractProject<P,R>,R extends AbstractBuild<P,R>>public Queue.Item getQueueItem()
Job
getQueueItem in interface IJobgetQueueItem in class Job<P extends AbstractProject<P,R>,R extends AbstractBuild<P,R>>public String getJDKName()
getJDKName in interface IAbstractProjectpublic JDK getJDK()
getJDK in interface IAbstractProject
public void setJDK(JDK jdk)
throws IOException
setJDK in interface IAbstractProjectjdk - new JDK candidate
IOException - if any.public void setJDK(String jdk)
IAbstractProject
setJDK in interface IAbstractProjectjdk - new jdk name value.public BuildAuthorizationToken getAuthToken()
public SortedMap<Integer,? extends R> _getRuns()
Job
public void removeRun(R run)
JobRun to remove it from this job.
The files are deleted already. So all the callee needs to do is to remove
a reference from this Job.
public List<Action> getActions()
A new Action can be added by getActions().add(...).
Note that this method returns a read-only view of Actions.
BuildSteps and others who want to add a project action should do
so by implementing BuildStep.getProjectActions(AbstractProject).
getActions in class ActionableTransientProjectActionFactorypublic Node getLastBuiltOn()
Node where this project was last built on.
getLastBuiltOn in interface SubTaskpublic Object getSameNodeConstraint()
SubTaskSubTasks of a Queue.Task needs to be collocated
with other SubTasks, those SubTasks should return the
equal object here. If null, the execution unit isn't under a colocation
constraint.
getSameNodeConstraint in interface SubTaskpublic final Queue.Task getOwnerTask()
SubTaskQueue.Task that this subtask belongs to.
getOwnerTask in interface SubTaskpublic boolean isBuildBlocked()
Short-hand for getCauseOfBlockage()!=null.
A project must be blocked if its own previous build is in progress, or if the blockBuildWhenUpstreamBuilding option is true and an upstream project is building, but derived classes can also check other conditions.
isBuildBlocked in interface Queue.Taskpublic String getWhyBlocked()
getWhyBlocked in interface Queue.Taskpublic CauseOfBlockage getCauseOfBlockage()
Queue.TaskOtherwise this method returns null, indicating that the build can proceed right away.
This can be used to define mutual exclusion that goes beyond
ResourceActivity.getResourceList().
getCauseOfBlockage in interface Queue.Taskpublic List<SubTask> getSubTasks()
Queue.TaskSubTasks that constitute this task.
The collection returned by this method must also contain the
primary SubTask represented by this Queue.TransientTask object
itself as the first element. The returned value is read-only.
At least size 1.
Since this is a newly added method, the invocation may results in
AbstractMethodError. Use Tasks#getSubTasksOf(Task)
that avoids this.
getSubTasks in interface Queue.Task
public R createExecutable()
throws IOException
SubTaskQueue.Executable, which performs the actual execution of the
task.
createExecutable in interface SubTaskIOExceptionpublic void checkAbortPermission()
Queue.Task
checkAbortPermission in interface Queue.Taskpublic boolean hasAbortPermission()
Queue.TaskQueue.Task.checkAbortPermission() except it indicates
the status by a return value, instead of exception.
hasAbortPermission in interface Queue.Taskpublic Resource getWorkspaceResource()
WorkspaceList for
each build (furthermore, that happens after a build is started.) So a
Resource representation for a workspace at the project level no
longer makes sense.
If you need to lock a workspace while you do some computation, see
the source code of pollSCMChanges(TaskListener) for how to
obtain a lock of a workspace through WorkspaceList.
Resource that represents the workspace of this project.
Useful for locking and mutual exclusion control.
public ResourceList getResourceList()
getResourceList in interface ResourceActivity
public boolean checkout(AbstractBuild build,
Launcher launcher,
BuildListener listener,
File changelogFile)
throws IOException,
InterruptedException
IOException
InterruptedExceptionpublic boolean pollSCMChanges(TaskListener listener)
poll(TaskListener) instead.
public PollingResult poll(TaskListener listener)
The implementation is responsible for ensuring mutual exclusion between polling and builds if necessary.
public boolean hasParticipant(User user)
@Exported public SCM getScm()
IAbstractProject
getScm in interface IAbstractProjectSCM instance
public void setScm(SCM scm)
throws IOException
IAbstractProject
setScm in interface IAbstractProjectscm - SCM
IOException - if any.
public void addTrigger(Trigger<?> trigger)
throws IOException
Trigger to this Project if not active yet.
addTrigger in interface IAbstractProjecttrigger - new trigger.
IOException - if any.
public void removeTrigger(TriggerDescriptor trigger)
throws IOException
IAbstractProjectTrigger frin this Project by
TriggerDescriptor.
removeTrigger in interface IAbstractProjecttrigger - descriptor of trigger.
IOException - if any.public Map<TriggerDescriptor,Trigger> getTriggers()
IAbstractProject
getTriggers in interface IAbstractProjectMap.public List<Trigger<?>> getTriggersList()
getTriggersList in interface IAbstractProjectTrigger elements.public DescribableList<Trigger<?>,TriggerDescriptor> getTriggerDescribableList()
getTriggerDescribableList in interface IAbstractProjectpublic <T extends Trigger> T getTrigger(Class<T> clazz)
getTrigger in interface IAbstractProjectclazz - class of trigger
public void setTriggers(List<Trigger<?>> triggerList)
IAbstractProject
setTriggers in interface IAbstractProjecttriggerList - list of Trigger objectpublic abstract boolean isFingerprintConfigured()
Fingerprint records.
@Exported public final List<AbstractProject> getDownstreamProjects()
AbstractProjects that should be built when a build
of this project is completed.
getDownstreamProjects in interface IAbstractProjectAbstractProjects that should be built when a
build of this project is completed.@Exported public final List<AbstractProject> getUpstreamProjects()
getUpstreamProjects in interface IAbstractProjectAbstractProjects that should be built before a
build of this project is started.public final List<AbstractProject> getBuildTriggerUpstreamProjects()
BuildTrigger to
this project. This is a subset of getUpstreamProjects()
getBuildTriggerUpstreamProjects in interface IAbstractProjectBuildTrigger to
this project.public final Set<AbstractProject> getTransitiveUpstreamProjects()
getTransitiveUpstreamProjects in interface IAbstractProjectpublic final Set<AbstractProject> getTransitiveDownstreamProjects()
getTransitiveDownstreamProjects in interface IAbstractProjectpublic SortedMap<Integer,Fingerprint.RangeSet> getRelationship(AbstractProject that)
getRelationship in interface IAbstractProjectthat - AbstractProject to find relations.
public boolean isParameterized()
isParameterized in interface IAbstractProject
public void doBuild(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
throws IOException,
javax.servlet.ServletException
IOException
javax.servlet.ServletException
public int getDelay(org.kohsuke.stapler.StaplerRequest req)
throws javax.servlet.ServletException
javax.servlet.ServletException
public void doBuildWithParameters(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
throws IOException,
javax.servlet.ServletException
IOException
javax.servlet.ServletException
public void doPolling(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
throws IOException,
javax.servlet.ServletException
IOException
javax.servlet.ServletException
public void doCancelQueue(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
throws IOException,
javax.servlet.ServletException
IOException
javax.servlet.ServletException
public DirectoryBrowserSupport doWs(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
throws IOException,
javax.servlet.ServletException,
InterruptedException
IOException
javax.servlet.ServletException
InterruptedException
public org.kohsuke.stapler.HttpResponse doDoWipeOutWorkspace()
throws IOException,
javax.servlet.ServletException,
InterruptedException
IOException
javax.servlet.ServletException
InterruptedException
public boolean cleanWorkspace()
throws IOException,
InterruptedException
IAbstractProject
cleanWorkspace in interface IAbstractProjectIOException - if any.
InterruptedException - if any.
@CLIMethod(name="disable-job")
public org.kohsuke.stapler.HttpResponse doDisable()
throws IOException,
javax.servlet.ServletException
IOException
javax.servlet.ServletException
@CLIMethod(name="enable-job")
public org.kohsuke.stapler.HttpResponse doEnable()
throws IOException,
javax.servlet.ServletException
IOException
javax.servlet.ServletException
public void doRssChangelog(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
throws IOException,
javax.servlet.ServletException
IOException
javax.servlet.ServletExceptionpublic static AbstractProject findNearest(String name)
AbstractProject that has the name closest to the given
name.
@CLIResolver
public static AbstractProject resolveForCLI(String name)
throws org.kohsuke.args4j.CmdLineException
org.kohsuke.args4j.CmdLineException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||