Package io.jenkins.blueocean.rest.model
Class BlueRun
java.lang.Object
io.jenkins.blueocean.rest.model.Resource
io.jenkins.blueocean.rest.model.BlueRun
- All Implemented Interfaces:
BlueItemRun,Reachable
BlueOCean Run model.
Implementers of different Run type
getType() can add additional data to this model. e.g. A FreeStyle job can
expose change log or Pipeline run can add steps and their status etc.- Author:
- Vivek Pandey
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic enumstatic enum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final StringDate String formatstatic final intstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract Collection<BlueActionProxy> abstract BlueArtifactContainerabstract Stringabstract BlueTestSummaryabstract Stringabstract Collection<BlueRun.BlueCause> abstract Container<BlueChangeSetEntry> abstract Stringabstract Longabstract Dateabstract StringRun end timeabstract Dateabstract StringEnque timeabstract Longabstract StringgetId()abstract ObjectgetLog()abstract StringgetName()abstract BluePipelineNodeContainergetNodes()abstract Stringabstract Stringabstract BlueRun.BlueRunResultabstract Stringabstract Dateabstract Stringabstract BlueRun.BlueRunStateabstract BluePipelineStepContainergetSteps()abstract BlueTestResultContainergetTests()abstract BlueTestSummaryDeprecated.abstract StringgetType()abstract booleanabstract BlueRunreplay()Replays a pipeline.abstract BlueRunAttempt to stop ongoing run.
-
Field Details
-
ORGANIZATION
- See Also:
-
ID
- See Also:
-
PIPELINE
- See Also:
-
NAME
- See Also:
-
DESCRIPTION
- See Also:
-
START_TIME
- See Also:
-
END_TIME
- See Also:
-
ENQUEUE_TIME
- See Also:
-
DURATION_IN_MILLIS
- See Also:
-
ESTIMATED_DURATION_IN_MILLIS
- See Also:
-
TYPE
- See Also:
-
RUN_SUMMARY
- See Also:
-
RESULT
- See Also:
-
STATE
- See Also:
-
CAUSE_OF_BLOCKAGE
- See Also:
-
REPLAYABLE
- See Also:
-
TEST_SUMMARY
- See Also:
-
ACTIONS
- See Also:
-
CAUSES
- See Also:
-
DEFAULT_BLOCKING_STOP_TIMEOUT_IN_SECS
public static final int DEFAULT_BLOCKING_STOP_TIMEOUT_IN_SECS- See Also:
-
DATE_FORMAT_STRING
Date String format- See Also:
-
-
Constructor Details
-
BlueRun
public BlueRun()
-
-
Method Details
-
getOrganization
- Specified by:
getOrganizationin interfaceBlueItemRun- Returns:
- name of the organization
-
getId
- Specified by:
getIdin interfaceBlueItemRun- Returns:
BlueRunid - unique within a pipeline
-
getPipeline
- Specified by:
getPipelinein interfaceBlueItemRun- Returns:
- Pipeline name - unique within an organization
-
getName
- Specified by:
getNamein interfaceBlueItemRun
-
getDescription
- Specified by:
getDescriptionin interfaceBlueItemRun
-
getStartTime
- Returns:
- Build execution start time inside executor
-
getChangeSet
@Exported(inline=true) @NonNull @Navigable public abstract Container<BlueChangeSetEntry> getChangeSet()- Specified by:
getChangeSetin interfaceBlueItemRun- Returns:
- Gives change set of a run
-
getStartTimeString
- Specified by:
getStartTimeStringin interfaceBlueItemRun- Returns:
- run start time
-
getEnQueueTime
- Returns:
- Time when build is scheduled and is in queue waiting for executor
-
getEnQueueTimeString
Description copied from interface:BlueItemRunEnque time- Specified by:
getEnQueueTimeStringin interfaceBlueItemRun
-
getEndTime
- Returns:
- Build end time
-
getEndTimeString
Description copied from interface:BlueItemRunRun end time- Specified by:
getEndTimeStringin interfaceBlueItemRun
-
getDurationInMillis
- Specified by:
getDurationInMillisin interfaceBlueItemRun- Returns:
- Build duration in milli seconds
-
getEstimatedDurtionInMillis
- Specified by:
getEstimatedDurtionInMillisin interfaceBlueItemRun- Returns:
- Estimated Build duration in milli seconds
-
getStateObj
- Specified by:
getStateObjin interfaceBlueItemRun- Returns:
- The state of the run
-
getResult
- Specified by:
getResultin interfaceBlueItemRun- Returns:
- The result state of the job (e.g unstable)
-
getRunSummary
- Specified by:
getRunSummaryin interfaceBlueItemRun- Returns:
- Build summary
-
getType
- Specified by:
getTypein interfaceBlueItemRun- Returns:
- Type of Run. Type name to be Jenkins Run.getClass().getSimpleName()
-
stop
@PUT @WebMethod(name="stop") public abstract BlueRun stop(@QueryParameter("blocking") Boolean blocking, @QueryParameter("timeOutInSecs") Integer timeOutInSecs) Attempt to stop ongoing run.- Parameters:
blocking- if true then tries to stop till times out.timeOutInSecs- if blocking is true then defines timeout value in seconds. Default 10 sec. If non-blocking then this parameter is ignored.- Returns:
- Blue run instance. Caller should look at state field to determine if stop was successful. If state is
BlueRun.BlueRunState.FINISHEDthen stop was successful or run finished normally.
-
getArtifactsZipFile
- Specified by:
getArtifactsZipFilein interfaceBlueItemRun- Returns:
- Uri of artifacts zip file.
-
getArtifacts
- Specified by:
getArtifactsin interfaceBlueItemRun- Returns:
- Run artifacts
-
getNodes
- Returns:
- Serves .../runs/{rundId}/nodes/ and provides pipeline execution nodes
- See Also:
-
getActions
@Navigable @Exported(name="actions", inline=true) public abstract Collection<BlueActionProxy> getActions()- Specified by:
getActionsin interfaceBlueItemRun- Returns:
- Gives Actions associated with this Run, if requested via tree
-
getSteps
- Returns:
- Gives steps from pipeline. The list of steps must not include stages, this is because stage could be interpreted as step as its StepAtomNode and implementation of this API must ensure not to include it.
-
getTests
- Specified by:
getTestsin interfaceBlueItemRun- Returns:
- Gives tests in this run
-
getTestSummary
Deprecated.- Specified by:
getTestSummaryin interfaceBlueItemRun- Returns:
- Gives the test summary for this run
-
getBlueTestSummary
-
getLog
- Specified by:
getLogin interfaceBlueItemRun- Returns:
- Instance of stapler aware instance that can do the following:
- Must be able to process start query parameter. 'start' parameter is the byte offset in the actual log file
- Must produce following HTTP headers in the response
- X-Text-Size It is the byte offset of the raw log file client should use in the next request as value of start query parameter.
- X-More-Data If its true, then client should repeat the request after some delay. In the repeated request it should use X-TEXT-SIZE header value with *start* query parameter.
-
replay
Replays a pipeline. The SCM commit/revision used in the existing and new runs should match.- Returns:
- The queued item.
-
getCauses
- Specified by:
getCausesin interfaceBlueItemRun- Returns:
- cause of the run being created
-
getCauseOfBlockage
- Specified by:
getCauseOfBlockagein interfaceBlueItemRun- Returns:
- cause of what is blocking this run
-
isReplayable
@Exported(name="replayable") public abstract boolean isReplayable()- Specified by:
isReplayablein interfaceBlueItemRun- Returns:
- if the run will allow a replay
-