Package se.diabol.jenkins.pipeline.model
Record Class Task
java.lang.Object
java.lang.Record
se.diabol.jenkins.pipeline.model.Task
- Record Components:
id- identifies the task within its pipeline; the job's full name for a chained job, the flow node id for a Pipeline stagename- what the box saysurl- where the box links to, relative to the Jenkins rootjobFullName- the job the task belongs to, which actions are posted for and whose permissions decide what the current user may do with the taskbuildNumber- the build the task shows, or nullstatus- the status of that builddescription- the task's description as safe HTML, or nullrebuildable- whether the build could be rebuilt from the view by a user who may build the job; for a Pipeline stage, whether the run can be restarted from the task's top-level stagerestart- the name of the top-level stage a rebuild restarts the Pipeline run from, or null when a rebuild builds the job againrequiresInput- whether the task is a Pipeline run waiting at an input stepinputUrl- where to provide the input when the waiting input step has parameters, relative to the Jenkins root; null when the step can be proceeded from the view or the task is not waitingmanual- the manual trigger leading to the task, or nulltests- test results of the buildanalysis- static analysis results of the buildpromotions- promotions of the builddownstream- ids of the tasks this task triggers
@ExportedBean(defaultVisibility=100)
public record Task(String id, String name, String url, String jobFullName, Integer buildNumber, Status status, String description, boolean rebuildable, String restart, boolean requiresInput, String inputUrl, ManualStep manual, List<TestSummary> tests, List<AnalysisSummary> analysis, List<Promotion> promotions, List<String> downstream)
extends Record
One box of a stage: a job of a chain of jobs, or a stage, nested stage or parallel branch of a Pipeline run.
-
Constructor Summary
ConstructorsConstructorDescriptionTask(String id, String name, String url, String jobFullName, Integer buildNumber, Status status, String description, boolean rebuildable, String restart, boolean requiresInput, String inputUrl, ManualStep manual, List<TestSummary> tests, List<AnalysisSummary> analysis, List<Promotion> promotions, List<String> downstream) Creates an instance of aTaskrecord class. -
Method Summary
Modifier and TypeMethodDescriptionanalysis()Returns the value of theanalysisrecord component.Returns the value of thebuildNumberrecord component.Returns the value of thedescriptionrecord component.Returns the value of thedownstreamrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.inputUrl()Returns the value of theinputUrlrecord component.Returns the value of thejobFullNamerecord component.longEpoch milliseconds of the task's last activity, 0 when none.manual()Returns the value of themanualrecord component.name()Returns the value of thenamerecord component.Permissions of the current user on the task's job.Returns the value of thepromotionsrecord component.booleanReturns the value of therebuildablerecord component.booleanReturns the value of therequiresInputrecord component.restart()Returns the value of therestartrecord component.status()Returns the value of thestatusrecord component.tests()Returns the value of thetestsrecord component.final StringtoString()Returns a string representation of this record class.url()Returns the value of theurlrecord component.withoutDetails(boolean keepTests, boolean keepAnalysis) The same task with only the details the view shows.
-
Constructor Details
-
Task
public Task(String id, String name, String url, String jobFullName, Integer buildNumber, Status status, String description, boolean rebuildable, String restart, boolean requiresInput, String inputUrl, ManualStep manual, List<TestSummary> tests, List<AnalysisSummary> analysis, List<Promotion> promotions, List<String> downstream) Creates an instance of aTaskrecord class.- Parameters:
id- the value for theidrecord componentname- the value for thenamerecord componenturl- the value for theurlrecord componentjobFullName- the value for thejobFullNamerecord componentbuildNumber- the value for thebuildNumberrecord componentstatus- the value for thestatusrecord componentdescription- the value for thedescriptionrecord componentrebuildable- the value for therebuildablerecord componentrestart- the value for therestartrecord componentrequiresInput- the value for therequiresInputrecord componentinputUrl- the value for theinputUrlrecord componentmanual- the value for themanualrecord componenttests- the value for thetestsrecord componentanalysis- the value for theanalysisrecord componentpromotions- the value for thepromotionsrecord componentdownstream- the value for thedownstreamrecord component
-
-
Method Details
-
permissions
Permissions of the current user on the task's job. -
withoutDetails
The same task with only the details the view shows. -
lastActivity
public long lastActivity()Epoch milliseconds of the task's last activity, 0 when none. -
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
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
url
Returns the value of theurlrecord component.- Returns:
- the value of the
urlrecord 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
-
status
Returns the value of thestatusrecord component.- Returns:
- the value of the
statusrecord component
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
rebuildable
@Exported public boolean rebuildable()Returns the value of therebuildablerecord component.- Returns:
- the value of the
rebuildablerecord component
-
restart
Returns the value of therestartrecord component.- Returns:
- the value of the
restartrecord component
-
requiresInput
@Exported public boolean requiresInput()Returns the value of therequiresInputrecord component.- Returns:
- the value of the
requiresInputrecord component
-
inputUrl
Returns the value of theinputUrlrecord component.- Returns:
- the value of the
inputUrlrecord component
-
manual
Returns the value of themanualrecord component.- Returns:
- the value of the
manualrecord 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
-
promotions
Returns the value of thepromotionsrecord component.- Returns:
- the value of the
promotionsrecord component
-
downstream
Returns the value of thedownstreamrecord component.- Returns:
- the value of the
downstreamrecord component
-