Class MaxDurationColumn
java.lang.Object
hudson.views.ListViewColumn
org.jenkinsci.plugins.additionalmetrics.MaxDurationColumn
- All Implemented Interfaces:
ExtensionPoint,Describable<ListViewColumn>
A Jenkins list view column that displays the longest running completed build for a job.
Shows both the build information and its duration.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetLongestRun(Job<? extends Job, ? extends Run> job) Finds and returns the completed build with the longest duration for the specified job.Methods inherited from class hudson.views.ListViewColumn
all, createDefaultInitialColumnList, createDefaultInitialColumnList, createDefaultInitialColumnList, getColumnCaption, getDescriptor, shownByDefault
-
Constructor Details
-
MaxDurationColumn
@DataBoundConstructor public MaxDurationColumn()Creates a new maximum duration column. This constructor is used by Jenkins for data binding.
-
-
Method Details
-
getLongestRun
Finds and returns the completed build with the longest duration for the specified job. Only considers builds that have completed (not currently building) and have a positive duration.- Parameters:
job- the Jenkins job to find the longest running build for- Returns:
- a RunWithDuration containing the longest running build and its duration, or null if no completed builds with positive duration exist
-