Record Class Stage

java.lang.Object
java.lang.Record
se.diabol.jenkins.pipeline.model.Stage
Record Components:
id - identifies the stage within its pipeline
name - the heading of the box
row - the row of the grid the stage sits in, starting at 0
column - the column of the grid, starting at 0
version - in the aggregated pipeline, the version that last reached the stage, which for a Pipeline job is the display name of the newest run that ran the stage; null otherwise
tasks - the tasks, in order
downstream - ids of the stages this stage leads to, for drawing arrows
status - the stage's own status: for a Pipeline stage that of the whole stage block, which can be worse than any of its tasks when steps outside them failed or went unstable; null for a stage of a chain of jobs, whose tasks are builds of their own

@ExportedBean(defaultVisibility=100) public record Stage(String id, String name, int row, int column, String version, List<Task> tasks, List<String> downstream, Status status) extends Record
A column of tasks in the pipeline grid.
  • Constructor Details

    • Stage

      public Stage(String id, String name, int row, int column, String version, List<Task> tasks, List<String> downstream, Status status)
      Creates an instance of a Stage record class.
      Parameters:
      id - the value for the id record component
      name - the value for the name record component
      row - the value for the row record component
      column - the value for the column record component
      version - the value for the version record component
      tasks - the value for the tasks record component
      downstream - the value for the downstream record component
      status - the value for the status record component
  • Method Details

    • withPosition

      public Stage withPosition(int row, int column)
    • withTasks

      public Stage withTasks(List<Task> tasks, String version)
    • withoutDetails

      public Stage withoutDetails(boolean keepTests, boolean keepAnalysis)
      The same stage with only the task details the view shows.
    • 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
    • name

      @Exported public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • row

      @Exported public int row()
      Returns the value of the row record component.
      Returns:
      the value of the row record component
    • column

      @Exported public int column()
      Returns the value of the column record component.
      Returns:
      the value of the column record component
    • version

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

      @Exported public List<Task> tasks()
      Returns the value of the tasks record component.
      Returns:
      the value of the tasks record component
    • downstream

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

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