Class BuildFlowAction
- java.lang.Object
-
- com.axis.system.jenkins.plugins.downstream.yabv.BuildFlowAction
-
- All Implemented Interfaces:
Action
,ModelObject
@ExportedBean public class BuildFlowAction extends Object implements Action
Produces Transient Actions for visualizing the flow of downstream builds.- Author:
- Gustaf Lundh (C) Axis 2018
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BuildFlowAction.BuildActionFactory
static class
BuildFlowAction.ProjectActionFactory
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Matrix
buildMatrix()
void
doBuildFlow(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)
List<Set<Object>>
getAllItemsInFlow(int lookBack)
Returns all items in the build flow, populated from the root.Api
getApi()
Remote API access.BuildFlowOptions
getBuildFlowOptions()
String
getDisplayName()
String
getIconFileName()
Run
getRootUpstreamBuild()
Run
getTarget()
String
getUrlName()
static boolean
hasUpstreamOrDownstreamBuilds(Run target)
boolean
isAnyBuildOngoing()
boolean
isCacheRefreshing()
boolean
shouldDisplayBuildFlow()
-
-
-
Method Detail
-
getRootUpstreamBuild
public Run getRootUpstreamBuild()
-
getBuildFlowOptions
public BuildFlowOptions getBuildFlowOptions()
-
isAnyBuildOngoing
@Exported(visibility=1) public boolean isAnyBuildOngoing()
-
isCacheRefreshing
@Exported(visibility=1) public boolean isCacheRefreshing()
-
shouldDisplayBuildFlow
public boolean shouldDisplayBuildFlow()
-
hasUpstreamOrDownstreamBuilds
public static boolean hasUpstreamOrDownstreamBuilds(Run target)
-
getTarget
public Run getTarget()
-
buildMatrix
public Matrix buildMatrix()
-
getAllItemsInFlow
public List<Set<Object>> getAllItemsInFlow(int lookBack)
Returns all items in the build flow, populated from the root. Which target is root depends onBuildFlowOptions.isShowUpstreamBuilds()
.- Parameters:
lookBack
- number of historic build flows to fetch, based on the root target's previous builds.- Returns:
- A list of sets of Objects. Each set represents all items in a flow, starting from the root. The first set is calculated from the root, the next set is from the root target's previous build and so on.
-
getDisplayName
public String getDisplayName()
- Specified by:
getDisplayName
in interfaceAction
- Specified by:
getDisplayName
in interfaceModelObject
-
getUrlName
public String getUrlName()
- Specified by:
getUrlName
in interfaceAction
-
getIconFileName
public String getIconFileName()
- Specified by:
getIconFileName
in interfaceAction
-
doBuildFlow
public void doBuildFlow(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletException
- Throws:
IOException
javax.servlet.ServletException
-
getApi
public Api getApi()
Remote API access.
-
-