@ExportedBean public abstract class Run<JobT extends Job<JobT,RunT>,RunT extends Run<JobT,RunT>> extends Actionable implements ExtensionPoint, Comparable<RunT>, AccessControlled, PersistenceRoot, DescriptorByNameOwner, OnMaster
Job.
Custom Run type is always used in conjunction with
a custom Job type, so there's no separate registration
mechanism for custom Run types.
RunListener| Modifier and Type | Class and Description |
|---|---|
class |
Run.Artifact
A build artifact.
|
class |
Run.ArtifactList |
class |
Run.KeepLogBuildBadge
BuildBadgeAction that shows the logs are being kept. |
static class |
Run.RedirectUp |
class |
Run.RunExecution
Object that lives while the build is executed, to keep track of things that
are needed only during the build.
|
protected class |
Run.Runner
Deprecated.
as of 1.467
Please use
Run.RunExecution |
static class |
Run.RunnerAbortedException
Used in
Run.RunExecution.run(hudson.model.BuildListener) to indicates that a fatal error in a build
is reported to BuildListener and the build should be simply aborted
without further recording a stack trace. |
static class |
Run.StatusSummarizer
Used to implement
getBuildStatusSummary(). |
static class |
Run.Summary |
ExtensionPoint.LegacyInstancesAreScopedToHudsonModelObjectWithContextMenu.ContextMenu, ModelObjectWithContextMenu.ContextMenuVisibility, ModelObjectWithContextMenu.MenuItem| Modifier and Type | Field and Description |
|---|---|
static Permission |
ARTIFACTS
|
protected String |
charset
Charset in which the log file is written.
|
static Permission |
DELETE |
protected String |
description
Human-readable description.
|
protected long |
duration
Number of milli-seconds it took to run this build.
|
static FeedAdapter<Run> |
FEED_ADAPTER
FeedAdapter to produce feed from the summary of this build. |
static FeedAdapter<Run> |
FEED_ADAPTER_LATEST
FeedAdapter to produce feeds to show one build per project. |
static int |
LIST_CUTOFF
Maximum number of artifacts to list before using switching to the tree view.
|
protected RunT |
nextBuild
Next build.
|
int |
number
Build number.
|
static Comparator<Run> |
ORDER_BY_DATE
Sort by date.
|
static PermissionGroup |
PERMISSIONS |
protected RunT |
previousBuild
Previous build.
|
protected JobT |
project |
static long |
QUEUE_ID_UNKNOWN
The original
Queue.Item.getId() has not yet been mapped onto the Run instance. |
protected Result |
result
The build result.
|
protected long |
timestamp
When the build is scheduled.
|
static int |
TREE_CUTOFF
Maximum number of artifacts to show in tree view before just showing a link.
|
static Permission |
UPDATE |
static com.thoughtworks.xstream.XStream |
XSTREAM |
static XStream2 |
XSTREAM2
|
| Modifier | Constructor and Description |
|---|---|
protected |
Run(JobT job)
Creates a new
Run. |
protected |
Run(JobT job,
Calendar timestamp)
Constructor for creating a
Run object in
an arbitrary state. |
protected |
Run(JobT project,
File buildDir)
Loads a run from a log file.
|
protected |
Run(JobT job,
long timestamp) |
| Modifier and Type | Method and Description |
|---|---|
protected RunT |
_this()
Obtains 'this' in a more type safe signature.
|
void |
addAction(Action a)
Adds a new action.
|
boolean |
canToggleLogKeep()
Checks whether keep status can be toggled.
|
void |
checkPermission(Permission p)
Convenient short-cut for
getACL().checkPermission(permission) |
int |
compareTo(RunT that)
Ordering based on build numbers.
|
protected BuildReference<RunT> |
createReference()
Called by
RunMap to obtain a reference to this run. |
void |
delete()
Deletes this build and its entire log
|
void |
deleteArtifacts()
Deletes this build's artifacts.
|
DirectoryBrowserSupport |
doArtifact()
Serves the artifacts.
|
void |
doBuildNumber(org.kohsuke.stapler.StaplerResponse rsp)
Returns the build number in the body.
|
void |
doBuildStatus(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp) |
void |
doBuildTimestamp(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp,
String format)
Returns the build time stamp in the body.
|
org.kohsuke.stapler.HttpResponse |
doConfigSubmit(org.kohsuke.stapler.StaplerRequest req) |
void |
doConsoleText(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
Sends out the raw console output.
|
void |
doDoDelete(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
Deletes the build when the button is pressed.
|
void |
doProgressiveLog(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
Deprecated.
as of 1.352
Use
getLogText().doProgressiveText(req,rsp) |
void |
doSubmitDescription(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
Accepts the new description.
|
void |
doToggleLogKeep(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp) |
protected void |
dropLinks()
Called by
RunMap to drop bi-directional links in preparation for
deleting a build. |
protected void |
execute(Run.RunExecution job) |
static Run<?,?> |
fromExternalizableId(String id)
Tries to find a run from an persisted identifier.
|
String |
getAbsoluteUrl()
Deprecated.
This method shall NEVER be used during HTML page rendering, as it's too easy for
misconfiguration to break this value, with network set up like Apache reverse proxy.
This method is only intended for the remote API clients who cannot resolve relative references.
|
ACL |
getACL()
Obtains the ACL associated with this object.
|
Api |
getApi() |
ArtifactManager |
getArtifactManager()
Gets an object responsible for storing and retrieving build artifacts.
|
List<Run.Artifact> |
getArtifacts()
Gets the artifacts (relative to
getArtifactsDir(). |
File |
getArtifactsDir()
Deprecated.
Should only be used from
StandardArtifactManager or subclasses. |
List<Run.Artifact> |
getArtifactsUpTo(int artifactsNumber)
Gets the first N artifacts.
|
List<BuildBadgeAction> |
getBadgeActions()
Gets the subset of
Actionable.getActions() that consists of BuildBadgeActions. |
String |
getBuildStatusIconClassName() |
Run.Summary |
getBuildStatusSummary()
Gets an object which represents the single line summary of the status of this build
(especially in comparison with the previous build.)
|
String |
getBuildStatusUrl() |
<T extends Cause> |
getCause(Class<T> type)
Returns a
Cause of a particular type. |
List<Cause> |
getCauses()
Returns the
Causes that triggered a build. |
EnvVars |
getCharacteristicEnvVars()
Builds up the environment variable map that's sufficient to identify a process
as ours.
|
Charset |
getCharset()
Gets the charset in which the log file is written.
|
String |
getDescription() |
Descriptor |
getDescriptorByName(String className)
Exposes all
Descriptors by its name to URL. |
String |
getDisplayName() |
long |
getDuration()
Gets the millisecond it took to build.
|
String |
getDurationString()
Gets the string that says how long the build took to run.
|
Object |
getDynamic(String token,
org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp) |
EnvVars |
getEnvironment()
Deprecated.
as of 1.305 use
getEnvironment(TaskListener) |
EnvVars |
getEnvironment(TaskListener listener)
Returns the map that contains environmental variables to be used for launching
processes for this build.
|
Map<String,String> |
getEnvVars()
Deprecated.
as of 1.292
Use
getEnvironment(TaskListener) instead. |
long |
getEstimatedDuration()
Returns the estimated duration for this run if it is currently running.
|
Executor |
getExecutor()
Gets the
Executor building this job, if it's being built. |
String |
getExternalizableId()
Produces an identifier for this run unique in the system.
|
String |
getFullDisplayName() |
boolean |
getHasArtifacts()
Check if the
Run contains artifacts. |
BallColor |
getIconColor()
Gets the icon color for display.
|
String |
getId()
Unique ID of this build.
|
String |
getLog()
Deprecated.
since 2007-11-11.
Use
getLog(int) instead as it avoids loading
the whole log into memory unnecessarily. |
List<String> |
getLog(int maxLines)
Gets the log of the build as a list of strings (one per log line).
|
File |
getLogFile()
Returns the log file.
|
InputStream |
getLogInputStream()
Returns an input stream that reads from the log file.
|
Reader |
getLogReader() |
AnnotatedLargeText |
getLogText()
Used to URL-bind
AnnotatedLargeText. |
RunT |
getNextBuild() |
int |
getNumber() |
Executor |
getOneOffExecutor()
Gets the one off
Executor building this job, if it's being built. |
JobT |
getParent()
The project this build is for.
|
RunT |
getPreviousBuild() |
RunT |
getPreviousBuildInProgress()
Obtains the next younger build in progress.
|
List<RunT> |
getPreviousBuildsOverThreshold(int numberOfBuilds,
Result threshold)
Returns the last 'numberOfBuilds' builds with a build result >= 'threshold'.
|
RunT |
getPreviousBuiltBuild()
Returns the last build that was actually built - i.e., skipping any with Result.NOT_BUILT
|
RunT |
getPreviousCompletedBuild()
Gets the most recent completed build excluding 'this' Run itself.
|
RunT |
getPreviousFailedBuild()
Returns the last failed build before this build.
|
RunT |
getPreviousNotFailedBuild()
Returns the last build that didn't fail before this build.
|
RunT |
getPreviousSuccessfulBuild()
Returns the last successful build before this build.
|
long |
getQueueId()
Get the
Queue.Item.getId() of the original queue item from where this Run instance
originated. |
Result |
getResult()
Returns the build result.
|
File |
getRootDir()
Get the root directory of this
Run on the master. |
String |
getSearchUrl()
Returns the URL of this item relative to the parent
SearchItem. |
long |
getStartTimeInMillis()
When the build has started running in an executor.
|
Date |
getTime()
Same as
getTimestamp() but in a different type. |
long |
getTimeInMillis()
Same as
getTimestamp() but in a different type, that is since the time of the epoc. |
Calendar |
getTimestamp()
When the build is scheduled.
|
String |
getTimestampString()
Gets the string that says how long since this build has started.
|
String |
getTimestampString2()
Returns the timestamp formatted in xs:dateTime.
|
List<Action> |
getTransientActions()
Deprecated.
Use
Actionable.getAllActions() instead. |
String |
getTruncatedDescription()
Returns the length-limited description.
|
String |
getUrl()
Returns the URL of this
Run, relative to the context root of Hudson. |
String |
getWhyKeepLog()
If
isKeepLog() returns true, returns a short, human-readable
sentence that explains why it's being kept. |
boolean |
hasCustomDisplayName() |
boolean |
hasntStartedYet()
Returns true if the build is still queued and hasn't started yet.
|
boolean |
hasPermission(Permission p)
Convenient short-cut for
getACL().hasPermission(permission) |
boolean |
isBuilding()
Returns true if the build is not completed yet.
|
protected boolean |
isInProgress()
Determine whether the run is being build right now.
|
boolean |
isKeepLog()
Returns true if this log file should be kept and not deleted.
|
boolean |
isLogUpdated()
Returns true if the log file is still being updated.
|
void |
keepLog()
Marks this build to keep the log.
|
void |
keepLog(boolean newValue) |
protected SearchIndexBuilder |
makeSearchIndex()
Default implementation that returns empty index.
|
protected void |
onEndBuilding()
Called when a job finished building normally or abnormally.
|
protected void |
onLoad()
Called after the build is loaded and the object is added to the build list.
|
protected void |
onStartBuilding()
Called when a job started building.
|
ArtifactManager |
pickArtifactManager()
Selects an object responsible for storing and retrieving build artifacts.
|
void |
reload()
Reloads the build record from disk.
|
protected void |
run(Run.Runner job)
Deprecated.
as of 1.467
Use
execute(RunExecution) |
void |
save()
Save the settings to a file.
|
void |
setDescription(String description) |
void |
setDisplayName(String value) |
void |
setQueueId(long queueId)
Set the queue item ID.
|
void |
setResult(Result r)
Sets the
getResult() of this build. |
protected void |
submit(net.sf.json.JSONObject json) |
String |
toString() |
void |
updateSymlinks(TaskListener listener)
Makes sure that
lastSuccessful and lastStable legacy links in the project’s root directory exist. |
void |
writeLogTo(long offset,
org.apache.commons.jelly.XMLOutput out)
Used from console.jelly to write annotated log to the given output.
|
void |
writeWholeLogTo(OutputStream out)
Writes the complete log from the start to finish to the
OutputStream. |
doContextMenu, getAction, getAction, getActions, getActions, getAllActions, replaceActiongetSearch, getSearchIndex, getSearchName, requirePOST, sendError, sendError, sendError, sendError, sendErrorpublic static final long QUEUE_ID_UNKNOWN
Queue.Item.getId() has not yet been mapped onto the Run instance.public transient int number
In earlier versions < 1.24, this number is not unique nor continuous, but going forward, it will, and this really replaces the build id.
@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) protected transient volatile RunT extends Run<JobT,RunT> previousBuild
getPreviousBuild()@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) protected transient volatile RunT extends Run<JobT,RunT> nextBuild
getNextBuild()protected long timestamp
protected volatile Result result
Run.State.BUILDING.protected volatile String description
protected long duration
protected String charset
Charset.getCharset()public static final int LIST_CUTOFF
public static final int TREE_CUTOFF
public static final com.thoughtworks.xstream.XStream XSTREAM
public static final XStream2 XSTREAM2
public static final Comparator<Run> ORDER_BY_DATE
public static final FeedAdapter<Run> FEED_ADAPTER
FeedAdapter to produce feed from the summary of this build.public static final FeedAdapter<Run> FEED_ADAPTER_LATEST
FeedAdapter to produce feeds to show one build per project.public static final PermissionGroup PERMISSIONS
public static final Permission DELETE
public static final Permission UPDATE
public static final Permission ARTIFACTS
protected Run(@Nonnull JobT job) throws IOException
Run.job - Owner jobIOExceptionprotected Run(@Nonnull JobT job, @Nonnull Calendar timestamp)
Run object in
an arbitrary state.
number must be set manually.
May be used in a SubTask#createExecutable (instead of calling LazyBuildMixIn#newBuild).
For example, MatrixConfiguration.newBuild does this
so that the timestamp as well as number are shared with the parent build.
protected Run(@Nonnull JobT job, long timestamp)
Run(Job, Calendar)protected Run(@Nonnull JobT project, @Nonnull File buildDir) throws IOException
IOExceptionpublic void reload()
throws IOException
IOExceptionprotected void onLoad()
@Deprecated public List<Action> getTransientActions()
Actionable.getAllActions() instead.public void addAction(@Nonnull Action a)
getActions().add(a).
A RunAction2 is handled specially.addAction in class Actionable@Exported public long getQueueId()
Queue.Item.getId() of the original queue item from where this Run instance
originated.@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) public void setQueueId(long queueId)
Queue.Item.getId().queueId - The queue item ID.@Exported @CheckForNull public Result getResult()
When a build is in progress, this method
returns an intermediate result.
public void setResult(@Nonnull Result r)
getResult() of this build.
Has no effect when the result is already set and worse than the proposed result.
May only be called after the build has started and before it has moved into post-production
(normally meaning both isInProgress() and isBuilding() are true).r - the proposed new resultIllegalStateException - if the build has not yet started, is in post-production, or is complete@Nonnull public List<BuildBadgeAction> getBadgeActions()
Actionable.getActions() that consists of BuildBadgeActions.@Exported public boolean isBuilding()
protected boolean isInProgress()
public boolean isLogUpdated()
@Exported @CheckForNull public Executor getExecutor()
Executor building this job, if it's being built.
Otherwise null.
This method looks for Executor who's assigned to this build,
and because of that this might not be necessarily in sync with the return value of isBuilding() —
an executor holds on to Run some more time even after the build is finished (for example to
perform post-production processing.)Executables#getExecutor@CheckForNull public Executor getOneOffExecutor()
Executor building this job, if it's being built.
Otherwise null.@Nonnull public final Charset getCharset()
@Nonnull public List<Cause> getCauses()
Causes that triggered a build.
If a build sits in the queue for a long time, multiple build requests made during this period are all rolled up into one build, hence this method may return a list.
@CheckForNull public <T extends Cause> T getCause(Class<T> type)
Cause of a particular type.@Exported public final boolean isKeepLog()
BuildDiscarder.@CheckForNull public String getWhyKeepLog()
isKeepLog() returns true, returns a short, human-readable
sentence that explains why it's being kept.@Exported @Nonnull public Calendar getTimestamp()
getStartTimeInMillis()@Nonnull public final Date getTime()
getTimestamp() but in a different type.public final long getTimeInMillis()
getTimestamp() but in a different type, that is since the time of the epoc.public final long getStartTimeInMillis()
getTimestamp()@Exported public String getDescription()
@Nonnull public String getTruncatedDescription()
@Nonnull public String getTimestampString()
@Nonnull public String getTimestampString2()
@Nonnull public String getDurationString()
@Exported public long getDuration()
public boolean hasntStartedYet()
@Exported public String getFullDisplayName()
@Exported public String getDisplayName()
getDisplayName in interface ModelObjectpublic boolean hasCustomDisplayName()
public void setDisplayName(String value) throws IOException
value - Set to null to revert back to the default "#NNN".IOException@Exported(visibility=2) public int getNumber()
@Nonnull protected BuildReference<RunT> createReference()
RunMap to obtain a reference to this run.LazyBuildMixIn.RunMixIn.createReference()protected void dropLinks()
RunMap to drop bi-directional links in preparation for
deleting a build.LazyBuildMixIn.RunMixIn.dropLinks()@CheckForNull public RunT getPreviousBuild()
@CheckForNull public final RunT getPreviousCompletedBuild()
@CheckForNull public final RunT getPreviousBuildInProgress()
We basically follow the existing skip list, and wherever we find a non-optimal pointer, we remember them in 'fixUp' and update them later.
@CheckForNull public RunT getPreviousBuiltBuild()
@CheckForNull public RunT getPreviousNotFailedBuild()
@CheckForNull public RunT getPreviousFailedBuild()
@CheckForNull public RunT getPreviousSuccessfulBuild()
@Nonnull public List<RunT> getPreviousBuildsOverThreshold(int numberOfBuilds, @Nonnull Result threshold)
numberOfBuilds - the desired number of buildsthreshold - the build result threshold@CheckForNull public RunT getNextBuild()
LazyBuildMixIn.RunMixIn.getNextBuild()@Nonnull public String getUrl()
Run, relative to the context root of Hudson.@Exported(visibility=2,
name="url")
@Deprecated
@Nonnull
public final String getAbsoluteUrl()
@Nonnull public final String getSearchUrl()
SearchItemSearchItem.getSearchUrl in interface SearchItem@Exported @Nonnull public String getId()
number, but may be a formatted timestamp for historical builds.@CheckForNull public Descriptor getDescriptorByName(String className)
DescriptorByNameOwnerDescriptors by its name to URL.
Implementation should always delegate to Jenkins.getDescriptorByName(String).
getDescriptorByName in interface DescriptorByNameOwnerclassName - Either Descriptor.getId() (recommended) or the short name.@Nonnull public File getRootDir()
Run on the master.
Files related to this Run should be stored below this directory.getRootDir in interface PersistenceRootRun on the master. Never null@Nonnull public final ArtifactManager getArtifactManager()
pickArtifactManager() has previously been called on this build,
and a nondefault manager selected, that will be returned.
Otherwise (including if we are loading a historical build created prior to this feature) StandardArtifactManager is used.
This method should be used when existing artifacts are to be loaded, displayed, or removed.
If adding artifacts, use pickArtifactManager() instead.
@Nonnull public final ArtifactManager pickArtifactManager() throws IOException
ArtifactManagerConfiguration is checked
to see if one will handle this build.
If so, that manager is saved in the build and it will be used henceforth.
If no manager claimed the build, StandardArtifactManager is used.
This method should be used when a build step expects to archive some artifacts.
If only displaying existing artifacts, use getArtifactManager() instead.
IOException - if a custom manager was selected but the selection could not be saved@Deprecated public File getArtifactsDir()
StandardArtifactManager or subclasses.@Exported @Nonnull public List<Run.Artifact> getArtifacts()
getArtifactsDir().@Nonnull public List<Run.Artifact> getArtifactsUpTo(int artifactsNumber)
public boolean getHasArtifacts()
Run contains artifacts.
The strange method name is so that we can access it from EL.@Nonnull public File getLogFile()
@Nonnull public InputStream getLogInputStream() throws IOException
IOException@Nonnull public Reader getLogReader() throws IOException
IOExceptionpublic void writeLogTo(long offset,
@Nonnull
org.apache.commons.jelly.XMLOutput out)
throws IOException
IOExceptionpublic void writeWholeLogTo(@Nonnull OutputStream out) throws IOException, InterruptedException
OutputStream.
If someone is still writing to the log, this method will not return until the whole log
file gets written out.
The method does not close the OutputStream.IOExceptionInterruptedException@Nonnull public AnnotatedLargeText getLogText()
AnnotatedLargeText.Run log with annotations@Nonnull protected SearchIndexBuilder makeSearchIndex()
AbstractModelObjectmakeSearchIndex in class AbstractModelObjectpublic void checkPermission(@Nonnull Permission p)
AccessControlledgetACL().checkPermission(permission)checkPermission in interface AccessControlledpublic boolean hasPermission(@Nonnull Permission p)
AccessControlledgetACL().hasPermission(permission)hasPermission in interface AccessControlledpublic ACL getACL()
AccessControlledgetACL in interface AccessControlledpublic void deleteArtifacts()
throws IOException
IOException - if we fail to delete.public void delete()
throws IOException
IOException - if we fail to delete.@Deprecated protected final void run(@Nonnull Run.Runner job)
execute(RunExecution)protected final void execute(@Nonnull Run.RunExecution job)
public final void updateSymlinks(@Nonnull TaskListener listener) throws InterruptedException
lastSuccessful and lastStable legacy links in the project’s root directory exist.
Normally you do not need to call this explicitly, since execute(hudson.model.Run<JobT, RunT>.RunExecution) does so,
but this may be needed if you are creating synthetic Runs as part of a container project (such as Maven builds in a module set).
You should also ensure that RunListener.fireStarted(hudson.model.Run, hudson.model.TaskListener) and RunListener.fireCompleted(hudson.model.Run, hudson.model.TaskListener) are called.listener - probably unusedInterruptedException - probably not thrownprotected void onStartBuilding()
protected void onEndBuilding()
public void save()
throws IOException
save in interface SaveableIOException - if the persistence failed.@Deprecated @Nonnull public String getLog() throws IOException
getLog(int) instead as it avoids loading
the whole log into memory unnecessarily.IOException@Nonnull public List<String> getLog(int maxLines) throws IOException
maxLines - The maximum number of log lines to return. If the log
is bigger than this, only the most recent lines are returned.IOException - If there is a problem reading the log file.public void doBuildStatus(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
throws IOException
IOExceptionpublic String getBuildStatusIconClassName()
@Nonnull public Run.Summary getBuildStatusSummary()
Run.StatusSummarizer@Nonnull public DirectoryBrowserSupport doArtifact()
org.acegisecurity.AccessDeniedException - Access deniedpublic void doBuildNumber(org.kohsuke.stapler.StaplerResponse rsp)
throws IOException
IOExceptionpublic void doBuildTimestamp(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp,
@QueryParameter
String format)
throws IOException
IOExceptionpublic void doConsoleText(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
throws IOException
IOException@Deprecated public void doProgressiveLog(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException
getLogText().doProgressiveText(req,rsp)IOExceptionpublic boolean canToggleLogKeep()
doToggleLogKeep(org.kohsuke.stapler.StaplerRequest, org.kohsuke.stapler.StaplerResponse) and keepLog(boolean) and keepLog() are optionspublic void doToggleLogKeep(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
throws IOException,
javax.servlet.ServletException
IOExceptionjavax.servlet.ServletException@CLIMethod(name="keep-build") public final void keepLog() throws IOException
IOExceptionpublic void keepLog(boolean newValue)
throws IOException
IOExceptionpublic void doDoDelete(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
throws IOException,
javax.servlet.ServletException
IOExceptionjavax.servlet.ServletExceptionpublic void setDescription(String description) throws IOException
IOExceptionpublic void doSubmitDescription(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
throws IOException,
javax.servlet.ServletException
IOExceptionjavax.servlet.ServletException@Deprecated public Map<String,String> getEnvVars()
getEnvironment(TaskListener) instead.@Deprecated public EnvVars getEnvironment() throws IOException, InterruptedException
getEnvironment(TaskListener)IOExceptionInterruptedException@Nonnull public EnvVars getEnvironment(@Nonnull TaskListener listener) throws IOException, InterruptedException
BuildSteps that invoke external processes should use this.
This allows BuildWrappers and other project configurations (such as JDK selection)
to take effect.
Unlike earlier getEnvVars(), this map contains the whole environment,
not just the overrides, so one can introspect values to change its behavior.
IOExceptionInterruptedException@Nonnull public final EnvVars getCharacteristicEnvVars()
ProcessTree.killAll(Map).@Nonnull public String getExternalizableId()
AbstractItem.getFullName(), then #, then getNumber()fromExternalizableId(java.lang.String)@CheckForNull public static Run<?,?> fromExternalizableId(String id) throws IllegalArgumentException
id - as produced by getExternalizableId()IllegalArgumentException - if the ID is malformed@Exported public long getEstimatedDuration()
Job.getEstimatedDuration(), may be overridden in subclasses
if duration may depend on run specific parameters (like incremental Maven builds).@Nonnull public org.kohsuke.stapler.HttpResponse doConfigSubmit(org.kohsuke.stapler.StaplerRequest req) throws IOException, javax.servlet.ServletException, Descriptor.FormException
IOExceptionjavax.servlet.ServletExceptionDescriptor.FormExceptionprotected void submit(net.sf.json.JSONObject json)
throws IOException
IOExceptionpublic Object getDynamic(String token, org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)
getDynamic in class ActionableCopyright © 2019. All rights reserved.