Class ExternalRun
- All Implemented Interfaces:
ExtensionPoint, DescriptorByNameOwner, ModelObject, PersistenceRoot, Saveable, SearchableModelObject, SearchItem, AccessControlled, Comparable<ExternalRun>, WithConsoleUrl, HistoricalBuild, ModelObjectWithContextMenu, OnMaster, org.kohsuke.stapler.StaplerProxy
Run for ExternalJob.- Author:
- Kohsuke Kawaguchi
-
Nested Class Summary
Nested classes/interfaces inherited from class Run
Run.Artifact, Run.ArtifactList, Run.KeepLogBuildBadge, Run.RedirectUp, Run.RunExecution, Run.Runner, Run.RunnerAbortedException, Run.StatusSummarizer, Run.SummaryNested classes/interfaces inherited from interface ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudsonNested classes/interfaces inherited from interface ModelObjectWithContextMenu
ModelObjectWithContextMenu.ContextMenu, ModelObjectWithContextMenu.ContextMenuVisibility, ModelObjectWithContextMenu.MenuItem, ModelObjectWithContextMenu.MenuItemType -
Field Summary
FieldsFields inherited from class Run
ARTIFACTS, charset, DELETE, description, duration, FEED_ADAPTER, FEED_ADAPTER_LATEST, LIST_CUTOFF, nextBuild, number, ORDER_BY_DATE, PERMISSIONS, previousBuild, project, QUEUE_ID_UNKNOWN, result, SKIP_PERMISSION_CHECK, timestamp, UPDATE, XSTREAM, XSTREAM2 -
Method Summary
Modifier and TypeMethodDescriptionvoidacceptRemoteSubmission(int result, long duration, InputStream stream) voidacceptRemoteSubmission(int result, long duration, String log) voidInstead of performing a build, accept the log and the return code from a remote machine.voidInstead of performing a build, run the specified command, record the log and its exit code, then call it a build.Methods inherited from class Run
_this, addAction, canToggleLogKeep, compareTo, createReference, delete, deleteArtifacts, doArtifact, doBuildNumber, doBuildStatus, doBuildTimestamp, doConfigSubmit, doConsoleText, doConsoleText, doDoDelete, doDoDelete, doProgressiveLog, doSubmitDescription, doToggleLogKeep, dropLinks, execute, fromExternalizableId, getAbsoluteUrl, getACL, getApi, getArtifactManager, getArtifacts, getArtifactsDir, getArtifactsUpTo, getBadgeActions, getBuildFingerprints, getBuildsOverThreshold, getBuildStatusSummary, getCause, getCauses, getCharacteristicEnvVars, getCharset, getConsoleUrl, getDescription, getDisplayName, getDuration, getDurationString, getDynamic, getDynamic, getEnvironment, getEnvironment, getEnvVars, getEstimatedDuration, getExecutor, getExternalizableId, getFullDisplayName, getHasArtifacts, getIconColor, getId, getLog, getLog, getLogFile, getLogInputStream, getLogReader, getLogText, getNextBuild, getNumber, getOneOffExecutor, getParameterValues, getParent, getPreviousBuild, getPreviousBuildInProgress, getPreviousBuildsOverThreshold, getPreviousBuiltBuild, getPreviousCompletedBuild, getPreviousFailedBuild, getPreviousNotFailedBuild, getPreviousSuccessfulBuild, getQueueId, getResult, getRootDir, getSearchUrl, getStartTimeInMillis, getTarget, getTime, getTimeInMillis, getTimestamp, getTimestampString, getTimestampString2, getTransientActions, getUrl, getWhyKeepLog, hasCustomDisplayName, hasntStartedYet, isBuilding, isInProgress, isKeepLog, isLogUpdated, keepLog, keepLog, makeSearchIndex, onEndBuilding, onLoad, onStartBuilding, pickArtifactManager, reload, run, save, setDescription, setDisplayName, setQueueId, setResult, submit, toString, updateSymlinks, writeLogTo, writeReplace, writeWholeLogToMethods inherited from class Actionable
addOrReplaceAction, doContextMenu, doContextMenu, getAction, getAction, getActions, getActions, getAllActions, removeAction, removeActions, replaceAction, replaceActionsMethods inherited from class AbstractModelObject
getSearch, getSearchIndex, getSearchName, requirePOST, sendError, sendError, sendError, sendError, sendError, sendError, sendError, sendErrorMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface AccessControlled
checkAnyPermission, checkPermission, hasAnyPermission, hasPermission, hasPermission, hasPermission2Methods inherited from interface DescriptorByNameOwner
getDescriptorByNameMethods inherited from interface HistoricalBuild
getBuildStatusIconClassName, getBuildStatusUrl, getTruncatedDescription
-
Field Details
-
ENABLE_DTD_PROPERTY_NAME
-
-
Method Details
-
run
Instead of performing a build, run the specified command, record the log and its exit code, then call it a build.- Parameters:
cmd- command to run as a build
-
acceptRemoteSubmission
Instead of performing a build, accept the log and the return code from a remote machine.The format of the XML is:
<pre><xmp> <run> <log>...console output...</log> <result>exit code</result> </run> </xmp></pre>- Parameters:
in- Log file referenc- Throws:
IOException
-
acceptRemoteSubmission
public void acceptRemoteSubmission(int result, long duration, InputStream stream) throws IOException - Parameters:
result- Result code of the external jobduration- Duration (in milliseconds) of the external job runstream- Stream of external job log- Throws:
IOException
-
acceptRemoteSubmission
- Parameters:
result- Result code of the external jobduration- Duration (in milliseconds) of the external job runlog- External job log- Throws:
IOException
-