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
Modifier and TypeClassDescriptionstatic class
static enum
static enum
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
Date String formatstatic final int
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract Collection<BlueActionProxy>
abstract BlueArtifactContainer
abstract String
abstract BlueTestSummary
abstract String
abstract Collection<BlueRun.BlueCause>
abstract Container<BlueChangeSetEntry>
abstract String
abstract Long
abstract Date
abstract String
Run end timeabstract Date
abstract String
Enque timeabstract Long
abstract String
getId()
abstract Object
getLog()
abstract String
getName()
abstract BluePipelineNodeContainer
getNodes()
abstract String
abstract String
abstract BlueRun.BlueRunResult
abstract String
abstract Date
abstract String
abstract BlueRun.BlueRunState
abstract BluePipelineStepContainer
getSteps()
abstract BlueTestResultContainer
getTests()
abstract BlueTestSummary
Deprecated.abstract String
getType()
abstract boolean
abstract BlueRun
replay()
Replays a pipeline.abstract BlueRun
Attempt 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:
getOrganization
in interfaceBlueItemRun
- Returns:
- name of the organization
-
getId
- Specified by:
getId
in interfaceBlueItemRun
- Returns:
BlueRun
id - unique within a pipeline
-
getPipeline
- Specified by:
getPipeline
in interfaceBlueItemRun
- Returns:
- Pipeline name - unique within an organization
-
getName
- Specified by:
getName
in interfaceBlueItemRun
-
getDescription
- Specified by:
getDescription
in interfaceBlueItemRun
-
getStartTime
- Returns:
- Build execution start time inside executor
-
getChangeSet
@Exported(inline=true) @NonNull @Navigable public abstract Container<BlueChangeSetEntry> getChangeSet()- Specified by:
getChangeSet
in interfaceBlueItemRun
- Returns:
- Gives change set of a run
-
getStartTimeString
- Specified by:
getStartTimeString
in interfaceBlueItemRun
- Returns:
- run start time
-
getEnQueueTime
- Returns:
- Time when build is scheduled and is in queue waiting for executor
-
getEnQueueTimeString
Description copied from interface:BlueItemRun
Enque time- Specified by:
getEnQueueTimeString
in interfaceBlueItemRun
-
getEndTime
- Returns:
- Build end time
-
getEndTimeString
Description copied from interface:BlueItemRun
Run end time- Specified by:
getEndTimeString
in interfaceBlueItemRun
-
getDurationInMillis
- Specified by:
getDurationInMillis
in interfaceBlueItemRun
- Returns:
- Build duration in milli seconds
-
getEstimatedDurtionInMillis
- Specified by:
getEstimatedDurtionInMillis
in interfaceBlueItemRun
- Returns:
- Estimated Build duration in milli seconds
-
getStateObj
- Specified by:
getStateObj
in interfaceBlueItemRun
- Returns:
- The state of the run
-
getResult
- Specified by:
getResult
in interfaceBlueItemRun
- Returns:
- The result state of the job (e.g unstable)
-
getRunSummary
- Specified by:
getRunSummary
in interfaceBlueItemRun
- Returns:
- Build summary
-
getType
- Specified by:
getType
in 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.FINISHED
then stop was successful or run finished normally.
-
getArtifactsZipFile
- Specified by:
getArtifactsZipFile
in interfaceBlueItemRun
- Returns:
- Uri of artifacts zip file.
-
getArtifacts
- Specified by:
getArtifacts
in 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:
getActions
in 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:
getTests
in interfaceBlueItemRun
- Returns:
- Gives tests in this run
-
getTestSummary
Deprecated.- Specified by:
getTestSummary
in interfaceBlueItemRun
- Returns:
- Gives the test summary for this run
-
getBlueTestSummary
-
getLog
- Specified by:
getLog
in 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:
getCauses
in interfaceBlueItemRun
- Returns:
- cause of the run being created
-
getCauseOfBlockage
- Specified by:
getCauseOfBlockage
in interfaceBlueItemRun
- Returns:
- cause of what is blocking this run
-
isReplayable
@Exported(name="replayable") public abstract boolean isReplayable()- Specified by:
isReplayable
in interfaceBlueItemRun
- Returns:
- if the run will allow a replay
-