@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, org.kohsuke.stapler.StaplerProxy
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 build is 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.LegacyInstancesAreScopedToHudson
ModelObjectWithContextMenu.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 which is used on the main build page.
|
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.
|
static boolean |
SKIP_PERMISSION_CHECK
Escape hatch for StaplerProxy-based access control
|
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.
|
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 BuildBadgeAction s. |
Collection<Fingerprint> |
getBuildFingerprints()
get the fingerprints associated with this build
|
protected List<RunT> |
getBuildsOverThreshold(int numberOfBuilds,
Result threshold)
Returns the last
numberOfBuilds builds with a build result ≥ threshold . |
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
Cause s 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() |
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()
Deprecated.
Assumes file-based storage of the log, which is not necessarily the case for Pipelines after JEP-210. Use other methods giving various kinds of streams such as
getLogReader() , getLogInputStream() , or getLogText() . |
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.
|
Object |
getTarget() |
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 epoch. |
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()
Deprecated.
truncated description based on the
TRUNCATED_DESCRIPTION_LIMIT setting. |
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 |
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 build should be kept and not deleted.
|
boolean |
isLogUpdated()
Returns true if the log file is still being updated.
|
void |
keepLog()
Marks this build to be kept.
|
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(hudson.model.Run.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)
Deprecated.
After JENKINS-37862 this no longer does anything.
|
void |
writeLogTo(long offset,
org.apache.commons.jelly.XMLOutput out)
Used from
console.jelly to write annotated log to the given output. |
protected Object |
writeReplace() |
void |
writeWholeLogTo(OutputStream out)
Writes the complete log from the start to finish to the
OutputStream . |
addOrReplaceAction, doContextMenu, getAction, getAction, getActions, getActions, getAllActions, removeAction, removeActions, replaceAction, replaceActions
getSearch, getSearchIndex, getSearchName, requirePOST, sendError, sendError, sendError, sendError, sendError
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
checkAnyPermission, checkPermission, hasAnyPermission, hasPermission, hasPermission, hasPermission2
getDescriptorByName
public 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
.@CheckForNull protected volatile String description
MarkupFormatter
.
getTruncatedDescription()
may be used to retrieve a size-limited description,
but it implies some limitations.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
@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) public static boolean SKIP_PERMISSION_CHECK
protected Run(@NonNull JobT job) throws IOException
Run
.job
- Owner jobIOException
protected 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
IOException
public void reload() throws IOException
IOException
protected void onLoad()
@Deprecated public List<Action> getTransientActions()
Actionable.getAllActions()
instead.public void addAction(@NonNull Action a)
Actionable.getAllActions()
that happen before calls to this method may not see the update.
Note: this method will always modify the actions
A RunAction2
is handled specially.addAction
in class Actionable
@NonNull protected RunT _this()
public int compareTo(@NonNull RunT that)
@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)
Mapped from the 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 BuildBadgeAction
s.@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.)@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()
Cause
s 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.@NonNull public JobT getParent()
@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 epoch.public final long getStartTimeInMillis()
getTimestamp()
@Exported @CheckForNull public String getDescription()
@Deprecated @CheckForNull public String getTruncatedDescription()
TRUNCATED_DESCRIPTION_LIMIT
setting.MarkupFormatter
is used.@NonNull public String getTimestampString()
@NonNull public String getTimestampString2()
@NonNull public String getDurationString()
@Exported public long getDuration()
@NonNull public BallColor getIconColor()
public boolean hasntStartedYet()
@Exported public String getFullDisplayName()
@Exported public String getDisplayName()
getDisplayName
in interface ModelObject
public 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
builds with a build result ≥ threshold
.numberOfBuilds
- the desired number of buildsthreshold
- the build result threshold@NonNull protected List<RunT> getBuildsOverThreshold(int numberOfBuilds, @NonNull Result threshold)
numberOfBuilds
builds with a build 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()
SearchItem
SearchItem
.getSearchUrl
in interface SearchItem
@Exported @NonNull public String getId()
number
, but may be a formatted timestamp for historical builds.@NonNull public File getRootDir()
Run
on the master.
Files related to this Run
should be stored below this directory.getRootDir
in interface PersistenceRoot
Run
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 @Exported(name="fingerprint", inline=true, visibility=-1) public Collection<Fingerprint> getBuildFingerprints()
@Deprecated @NonNull public File getLogFile()
getLogReader()
, getLogInputStream()
, or getLogText()
.@NonNull public InputStream getLogInputStream() throws IOException
IOException
@NonNull public Reader getLogReader() throws IOException
IOException
public void writeLogTo(long offset, @NonNull org.apache.commons.jelly.XMLOutput out) throws IOException
console.jelly
to write annotated log to the given output.IOException
public 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
.
IOException
InterruptedException
@NonNull public AnnotatedLargeText getLogText()
AnnotatedLargeText
.Run
log with annotations@NonNull protected SearchIndexBuilder makeSearchIndex()
AbstractModelObject
makeSearchIndex
in class AbstractModelObject
@NonNull public Api getApi()
public ACL getACL()
AccessControlled
getACL
in interface AccessControlled
public 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(hudson.model.Run.RunExecution)
protected final void execute(@NonNull Run.RunExecution job)
@Deprecated public final void updateSymlinks(@NonNull TaskListener listener) throws InterruptedException
InterruptedException
protected void onStartBuilding()
protected void onEndBuilding()
public void save() throws IOException
save
in interface Saveable
IOException
- if the persistence failed.protected Object writeReplace()
@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
IOException
@NonNull public String getBuildStatusUrl()
public String getBuildStatusIconClassName()
@NonNull public Run.Summary getBuildStatusSummary()
Run.StatusSummarizer
@NonNull public DirectoryBrowserSupport doArtifact()
org.springframework.security.access.AccessDeniedException
- Access deniedpublic void doBuildNumber(org.kohsuke.stapler.StaplerResponse rsp) throws IOException
IOException
public void doBuildTimestamp(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp, @QueryParameter String format) throws IOException
IOException
public 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)
IOException
public 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
IOException
javax.servlet.ServletException
@CLIMethod(name="keep-build") public final void keepLog() throws IOException
IOException
public void keepLog(boolean newValue) throws IOException
IOException
public void doDoDelete(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletException
IOException
javax.servlet.ServletException
public void setDescription(String description) throws IOException
IOException
public void doSubmitDescription(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletException
IOException
javax.servlet.ServletException
@Deprecated public Map<String,String> getEnvVars()
getEnvironment(TaskListener)
instead.@Deprecated public EnvVars getEnvironment() throws IOException, InterruptedException
getEnvironment(TaskListener)
IOException
InterruptedException
@NonNull public EnvVars getEnvironment(@NonNull TaskListener listener) throws IOException, InterruptedException
BuildStep
s that invoke external processes should use this.
This allows BuildWrapper
s 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.
IOException
InterruptedException
@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, org.springframework.security.access.AccessDeniedException
id
- as produced by getExternalizableId()
IllegalArgumentException
- if the ID is malformedorg.springframework.security.access.AccessDeniedException
- as per ItemGroup.getItem(java.lang.String)
@Exported public long getEstimatedDuration()
Job.getEstimatedDuration()
, may be overridden in subclasses
if duration may depend on run specific parameters (like incremental Maven builds).@POST @NonNull public org.kohsuke.stapler.HttpResponse doConfigSubmit(org.kohsuke.stapler.StaplerRequest req) throws IOException, javax.servlet.ServletException, Descriptor.FormException
IOException
javax.servlet.ServletException
Descriptor.FormException
protected void submit(net.sf.json.JSONObject json) throws IOException
IOException
public Object getDynamic(String token, org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)
getDynamic
in class Actionable
@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) public Object getTarget()
getTarget
in interface org.kohsuke.stapler.StaplerProxy
Copyright © 2004–2021. All rights reserved.