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 Details

  • Constructor Details

    • BluePipeline

      public BluePipeline()
  • Method Details

    • getOrganization

      @NonNull public abstract BlueOrganization getOrganization()
      Specified by:
      getOrganization in interface BluePipelineItem
      Returns:
      the organization that this pipeline is a child of
    • getOrganizationName

      @Exported(name="organization") public abstract String getOrganizationName()
      Specified by:
      getOrganizationName in interface BluePipelineItem
      Returns:
      name of the organization
    • getName

      @Exported(name="name") public abstract String getName()
      Specified by:
      getName in interface BluePipelineItem
      Returns:
      name of the pipeline
    • getDisplayName

      @Exported(name="displayName") public abstract String getDisplayName()
      Specified by:
      getDisplayName in interface BluePipelineItem
      Returns:
      human readable name of this pipeline
    • getFullName

      @Exported(name="fullName") public abstract String getFullName()
      Specified by:
      getFullName in interface BluePipelineItem
      Returns:
      Includes parent folders names if any. For example folder1/folder2/p1
    • getFullDisplayName

      @Exported(name="fullDisplayName") public abstract String getFullDisplayName()
      Specified by:
      getFullDisplayName in interface BluePipelineItem
      Returns:
      Includes display names of parent folders if any. For example folder1/myFolder2/p1
    • getWeatherScore

      @Exported(name="weatherScore") public abstract Integer getWeatherScore()
      Specified by:
      getWeatherScore in interface BlueRunnableItem
      Returns:
      weather health score percentile
    • getLatestRun

      @Exported(name="latestRun", inline=true) public abstract BlueRun getLatestRun()
      Specified by:
      getLatestRun in interface BlueRunnableItem
      Returns:
      The Latest Run for the branch
    • getDisabled

      @Exported(name="disabled", inline=true) public abstract Boolean getDisabled()
      Returns:
      If the pipeline is disabled or not
    • getEstimatedDurationInMillis

      @Exported(name="estimatedDurationInMillis") public abstract Long getEstimatedDurationInMillis()
      Specified by:
      getEstimatedDurationInMillis in interface BlueRunnableItem
      Returns:
      Estimated duration based on last pipeline runs. -1 is returned if there is no estimate available.
    • getRuns

      @Navigable @CheckForNull public abstract BlueRunContainer getRuns()
      Specified by:
      getRuns in interface BlueRunnableItem
      Returns:
      Gives Runs in this pipeline
    • getActions

      @Navigable @Exported(name="actions", inline=true) public abstract Collection<BlueActionProxy> getActions()
      Specified by:
      getActions in interface BluePipelineItem
      Returns:
      Gives Actions associated with this Run
    • getQueue

      @Navigable public abstract BlueQueueContainer getQueue()
      Specified by:
      getQueue in interface BlueRunnableItem
      Returns:
      Gives BlueQueueContainer
    • getParameters

      @Exported(name="parameters", inline=true) public abstract List<Object> getParameters()
      List of build parameters
      Specified by:
      getParameters in interface BlueRunnableItem
    • favorite

      @PUT @WebMethod(name="favorite") public abstract BlueFavorite favorite(@JsonBody BlueFavoriteAction favoriteAction)
    • enable

      @PUT @WebMethod(name="enable") public abstract void enable() throws IOException
      Throws:
      IOException
    • disable

      @PUT @WebMethod(name="disable") public abstract void disable() throws IOException
      Throws:
      IOException
    • getPermissions

      @Exported(name="permissions") public abstract Map<String,Boolean> 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

      public abstract BluePipelineScm getScm()
      Specified by:
      getScm in interface BlueManagedSource
      Returns:
      Gives scm resource attached to this pipeline
    • getTrends

      @Navigable public abstract BlueTrendContainer getTrends()
      Specified by:
      getTrends in interface BlueRunnableItem
      Returns:
      trend data related to this pipeline