Package io.jenkins.blueocean.rest.model
Class BluePipeline
java.lang.Object
io.jenkins.blueocean.rest.model.Resource
io.jenkins.blueocean.rest.model.BluePipeline
- All Implemented Interfaces:
BlueManagedSource
,BluePipelineItem
,BlueRunnableItem
,Reachable
- Direct Known Subclasses:
BluePipelineFolder
public abstract class BluePipeline
extends Resource
implements BluePipelineItem, BlueRunnableItem, BlueManagedSource
Defines pipeline state and its routing
- Author:
- Vivek Pandey
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final String
configure pipeline permissionstatic final String
Create pipelinestatic 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
Read pipeline permissionstatic final String
start pipeline runstatic final String
stop pipeline runstatic final String
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract void
disable()
abstract void
enable()
abstract BlueFavorite
favorite
(BlueFavoriteAction favoriteAction) abstract Collection<BlueActionProxy>
abstract Boolean
abstract String
abstract Long
abstract String
abstract String
abstract BlueRun
abstract String
getName()
abstract BlueOrganization
abstract String
List of build parametersGives permissions of user in context for a given pipeline.abstract BlueQueueContainer
getQueue()
abstract BlueRunContainer
getRuns()
abstract BluePipelineScm
getScm()
abstract BlueTrendContainer
abstract Integer
-
Field Details
-
ORGANIZATION
- See Also:
-
NAME
- See Also:
-
DISPLAY_NAME
- See Also:
-
FULL_NAME
- See Also:
-
FULL_DISPLAY_NAME
- See Also:
-
WEATHER_SCORE
- See Also:
-
LATEST_RUN
- See Also:
-
ESTIMATED_DURATION
- See Also:
-
ACTIONS
- See Also:
-
PERMISSIONS
- See Also:
-
DISABLED
- See Also:
-
CREATE_PERMISSION
Create pipeline- See Also:
-
READ_PERMISSION
Read pipeline permission- See Also:
-
START_PERMISSION
start pipeline run- See Also:
-
STOP_PERMISSION
stop pipeline run- See Also:
-
CONFIGURE_PERMISSION
configure pipeline permission- See Also:
-
-
Constructor Details
-
BluePipeline
public BluePipeline()
-
-
Method Details
-
getOrganization
- Specified by:
getOrganization
in interfaceBluePipelineItem
- Returns:
- the organization that this pipeline is a child of
-
getOrganizationName
- Specified by:
getOrganizationName
in interfaceBluePipelineItem
- Returns:
- name of the organization
-
getName
- Specified by:
getName
in interfaceBluePipelineItem
- Returns:
- name of the pipeline
-
getDisplayName
- Specified by:
getDisplayName
in interfaceBluePipelineItem
- Returns:
- human readable name of this pipeline
-
getFullName
- Specified by:
getFullName
in interfaceBluePipelineItem
- Returns:
- Includes parent folders names if any. For example folder1/folder2/p1
-
getFullDisplayName
- Specified by:
getFullDisplayName
in interfaceBluePipelineItem
- Returns:
- Includes display names of parent folders if any. For example folder1/myFolder2/p1
-
getWeatherScore
- Specified by:
getWeatherScore
in interfaceBlueRunnableItem
- Returns:
- weather health score percentile
-
getLatestRun
- Specified by:
getLatestRun
in interfaceBlueRunnableItem
- Returns:
- The Latest Run for the branch
-
getDisabled
- Returns:
- If the pipeline is disabled or not
-
getEstimatedDurationInMillis
- Specified by:
getEstimatedDurationInMillis
in interfaceBlueRunnableItem
- Returns:
- Estimated duration based on last pipeline runs. -1 is returned if there is no estimate available.
-
getRuns
- Specified by:
getRuns
in interfaceBlueRunnableItem
- Returns:
- Gives Runs in this pipeline
-
getActions
@Navigable @Exported(name="actions", inline=true) public abstract Collection<BlueActionProxy> getActions()- Specified by:
getActions
in interfaceBluePipelineItem
- Returns:
- Gives Actions associated with this Run
-
getQueue
- Specified by:
getQueue
in interfaceBlueRunnableItem
- Returns:
- Gives
BlueQueueContainer
-
getParameters
List of build parameters- Specified by:
getParameters
in interfaceBlueRunnableItem
-
favorite
@PUT @WebMethod(name="favorite") public abstract BlueFavorite favorite(@JsonBody BlueFavoriteAction favoriteAction) -
enable
- Throws:
IOException
-
disable
- Throws:
IOException
-
getPermissions
Gives permissions of user in context for a given pipeline. Following permissions are returned as key to the permission map: create, start, stop, read for a pipeline job:create: User can create a pipeline
start: User can start a run of this pipeline. If not applicable to certain pipeline then can be false or null.
stop: User can stop a run of this pipeline. If not applicable to certain pipeline then can be false or null.
read: User has permission to view this pipeline
For example for anonymous user with security enabled and only read permission, the permission map for a pipeline job is:
"permissions":{ "start": false, "stop": false, "create":false, "read": true }
Implementation of BluePipeline can provide their own set of permissions in addition to the ones defined- Returns:
- permission map
-
getScm
- Specified by:
getScm
in interfaceBlueManagedSource
- Returns:
- Gives scm resource attached to this pipeline
-
getTrends
- Specified by:
getTrends
in interfaceBlueRunnableItem
- Returns:
- trend data related to this pipeline
-