Package se.diabol.jenkins.pipeline.model
Record Class Pipeline
java.lang.Object
java.lang.Record
se.diabol.jenkins.pipeline.model.Pipeline
- Record Components:
id- identifies the instance within its component, such as "build#12" or "aggregated"version- the display name of the build that started the pipeline, or "#n" for a queued onetimestamp- epoch milliseconds when the pipeline started or was queuedaggregated- whether this is the aggregated pipelinejobFullName- the job whose build the pipeline is: the first job of a chain of jobs, or the Pipeline job; null for the aggregated pipelinebuildNumber- the number of that build, or null while it is queued and for the aggregated pipelinerebuildable- whether the whole pipeline can be run again from the view with the same parameters, by a user who may build the jobtriggers- what started the pipelinecontributors- authors of the changes that went into the pipelinechanges- the commits, when the view shows themcommits- number of commitstotalBuildTime- milliseconds of the longest route through the pipeline, when the view shows ittests- test results the run recorded outside the tasks shown, such as in a Declarative post sectionanalysis- static analysis results that belong to the run as a whole rather than to one of its tasksstages- the stages in grid orderstatus- the status of the pipeline's own run: for a Pipeline job the run's result, for a chain of jobs the first job's build; null for the aggregated row
@ExportedBean(defaultVisibility=100)
public record Pipeline(String id, String version, long timestamp, boolean aggregated, String jobFullName, Integer buildNumber, boolean rebuildable, List<Trigger> triggers, List<Contributor> contributors, List<Change> changes, int commits, long totalBuildTime, List<TestSummary> tests, List<AnalysisSummary> analysis, List<Stage> stages, Status status)
extends Record
One run of a component's pipeline, or the aggregated pipeline that shows each stage's latest version.
-
Constructor Summary
ConstructorsConstructorDescriptionPipeline(String id, String version, long timestamp, boolean aggregated, String jobFullName, Integer buildNumber, boolean rebuildable, List<Trigger> triggers, List<Contributor> contributors, List<Change> changes, int commits, long totalBuildTime, List<TestSummary> tests, List<AnalysisSummary> analysis, List<Stage> stages, Status status) Creates an instance of aPipelinerecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of theaggregatedrecord component.analysis()Returns the value of theanalysisrecord component.Returns the value of thebuildNumberrecord component.changes()Returns the value of thechangesrecord component.intcommits()Returns the value of thecommitsrecord component.Returns the value of thecontributorsrecord component.final booleanIndicates whether some other object is "equal to" this one.forSettings(ViewSettings settings) The same pipeline with only the details the view shows: the change log, test results and static analysis results.booleanfinal inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.Returns the value of thejobFullNamerecord component.longEpoch milliseconds of the most recent task activity, 0 when none.Permissions of the current user on the pipeline's job.booleanReturns the value of therebuildablerecord component.stages()Returns the value of thestagesrecord component.status()Returns the value of thestatusrecord component.tests()Returns the value of thetestsrecord component.longReturns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.longReturns the value of thetotalBuildTimerecord component.triggers()Returns the value of thetriggersrecord component.version()Returns the value of theversionrecord component.withStages(List<Stage> stages, long totalBuildTime) The same pipeline with other stages and total build time, for a source that adds the runs this one started.
-
Constructor Details
-
Pipeline
public Pipeline(String id, String version, long timestamp, boolean aggregated, String jobFullName, Integer buildNumber, boolean rebuildable, List<Trigger> triggers, List<Contributor> contributors, List<Change> changes, int commits, long totalBuildTime, List<TestSummary> tests, List<AnalysisSummary> analysis, List<Stage> stages, Status status) Creates an instance of aPipelinerecord class.- Parameters:
id- the value for theidrecord componentversion- the value for theversionrecord componenttimestamp- the value for thetimestamprecord componentaggregated- the value for theaggregatedrecord componentjobFullName- the value for thejobFullNamerecord componentbuildNumber- the value for thebuildNumberrecord componentrebuildable- the value for therebuildablerecord componenttriggers- the value for thetriggersrecord componentcontributors- the value for thecontributorsrecord componentchanges- the value for thechangesrecord componentcommits- the value for thecommitsrecord componenttotalBuildTime- the value for thetotalBuildTimerecord componenttests- the value for thetestsrecord componentanalysis- the value for theanalysisrecord componentstages- the value for thestagesrecord componentstatus- the value for thestatusrecord component
-
-
Method Details
-
permissions
Permissions of the current user on the pipeline's job. -
withStages
The same pipeline with other stages and total build time, for a source that adds the runs this one started. -
forSettings
The same pipeline with only the details the view shows: the change log, test results and static analysis results. Sources that compute a pipeline once and share it between views strip it per view with this. -
lastActivity
public long lastActivity()Epoch milliseconds of the most recent task activity, 0 when none. -
hasFailedTask
public boolean hasFailedTask() -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
version
Returns the value of theversionrecord component.- Returns:
- the value of the
versionrecord component
-
timestamp
@Exported public long timestamp()Returns the value of thetimestamprecord component.- Returns:
- the value of the
timestamprecord component
-
aggregated
@Exported public boolean aggregated()Returns the value of theaggregatedrecord component.- Returns:
- the value of the
aggregatedrecord component
-
jobFullName
Returns the value of thejobFullNamerecord component.- Returns:
- the value of the
jobFullNamerecord component
-
buildNumber
Returns the value of thebuildNumberrecord component.- Returns:
- the value of the
buildNumberrecord component
-
rebuildable
@Exported public boolean rebuildable()Returns the value of therebuildablerecord component.- Returns:
- the value of the
rebuildablerecord component
-
triggers
Returns the value of thetriggersrecord component.- Returns:
- the value of the
triggersrecord component
-
contributors
Returns the value of thecontributorsrecord component.- Returns:
- the value of the
contributorsrecord component
-
changes
Returns the value of thechangesrecord component.- Returns:
- the value of the
changesrecord component
-
commits
@Exported public int commits()Returns the value of thecommitsrecord component.- Returns:
- the value of the
commitsrecord component
-
totalBuildTime
@Exported public long totalBuildTime()Returns the value of thetotalBuildTimerecord component.- Returns:
- the value of the
totalBuildTimerecord component
-
tests
Returns the value of thetestsrecord component.- Returns:
- the value of the
testsrecord component
-
analysis
Returns the value of theanalysisrecord component.- Returns:
- the value of the
analysisrecord component
-
stages
Returns the value of thestagesrecord component.- Returns:
- the value of the
stagesrecord component
-
status
Returns the value of thestatusrecord component.- Returns:
- the value of the
statusrecord component
-