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 one
timestamp - epoch milliseconds when the pipeline started or was queued
aggregated - whether this is the aggregated pipeline
jobFullName - the job whose build the pipeline is: the first job of a chain of jobs, or the Pipeline job; null for the aggregated pipeline
buildNumber - the number of that build, or null while it is queued and for the aggregated pipeline
rebuildable - whether the whole pipeline can be run again from the view with the same parameters, by a user who may build the job
triggers - what started the pipeline
contributors - authors of the changes that went into the pipeline
changes - the commits, when the view shows them
commits - number of commits
totalBuildTime - milliseconds of the longest route through the pipeline, when the view shows it
tests - test results the run recorded outside the tasks shown, such as in a Declarative post section
analysis - static analysis results that belong to the run as a whole rather than to one of its tasks
stages - the stages in grid order
status - 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 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 a Pipeline record class.
      Parameters:
      id - the value for the id record component
      version - the value for the version record component
      timestamp - the value for the timestamp record component
      aggregated - the value for the aggregated record component
      jobFullName - the value for the jobFullName record component
      buildNumber - the value for the buildNumber record component
      rebuildable - the value for the rebuildable record component
      triggers - the value for the triggers record component
      contributors - the value for the contributors record component
      changes - the value for the changes record component
      commits - the value for the commits record component
      totalBuildTime - the value for the totalBuildTime record component
      tests - the value for the tests record component
      analysis - the value for the analysis record component
      stages - the value for the stages record component
      status - the value for the status record component
  • Method Details

    • permissions

      @Exported public Permissions permissions()
      Permissions of the current user on the pipeline's job.
    • withStages

      public Pipeline 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.
    • forSettings

      public Pipeline forSettings(ViewSettings settings)
      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

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • id

      @Exported public String id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • version

      @Exported public String version()
      Returns the value of the version record component.
      Returns:
      the value of the version record component
    • timestamp

      @Exported public long timestamp()
      Returns the value of the timestamp record component.
      Returns:
      the value of the timestamp record component
    • aggregated

      @Exported public boolean aggregated()
      Returns the value of the aggregated record component.
      Returns:
      the value of the aggregated record component
    • jobFullName

      @Exported public String jobFullName()
      Returns the value of the jobFullName record component.
      Returns:
      the value of the jobFullName record component
    • buildNumber

      @Exported public Integer buildNumber()
      Returns the value of the buildNumber record component.
      Returns:
      the value of the buildNumber record component
    • rebuildable

      @Exported public boolean rebuildable()
      Returns the value of the rebuildable record component.
      Returns:
      the value of the rebuildable record component
    • triggers

      @Exported public List<Trigger> triggers()
      Returns the value of the triggers record component.
      Returns:
      the value of the triggers record component
    • contributors

      @Exported public List<Contributor> contributors()
      Returns the value of the contributors record component.
      Returns:
      the value of the contributors record component
    • changes

      @Exported public List<Change> changes()
      Returns the value of the changes record component.
      Returns:
      the value of the changes record component
    • commits

      @Exported public int commits()
      Returns the value of the commits record component.
      Returns:
      the value of the commits record component
    • totalBuildTime

      @Exported public long totalBuildTime()
      Returns the value of the totalBuildTime record component.
      Returns:
      the value of the totalBuildTime record component
    • tests

      @Exported public List<TestSummary> tests()
      Returns the value of the tests record component.
      Returns:
      the value of the tests record component
    • analysis

      @Exported public List<AnalysisSummary> analysis()
      Returns the value of the analysis record component.
      Returns:
      the value of the analysis record component
    • stages

      @Exported public List<Stage> stages()
      Returns the value of the stages record component.
      Returns:
      the value of the stages record component
    • status

      @Exported public Status status()
      Returns the value of the status record component.
      Returns:
      the value of the status record component