Class AbstractCheckRunFactory
java.lang.Object
io.jenkins.plugins.gerritchecksapi.rest.AbstractCheckRunFactory
- Direct Known Subclasses:
GerritMultiBranchCheckRunFactory,GerritTriggerCheckRunFactory
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringThe ID of a check run that is a child of another one, e.g.computeActions(Run<?, ?> run) protected List<CheckResult> computeCheckResults(Run<?, ?> run) static List<CheckResult> computeCheckResults(Run<?, ?> run, String resultIdPrefix, String runUrl) The result of the run itself.static List<CheckResult> computeCheckResults(Jenkins jenkins, Run<?, ?> run, String resultIdPrefix, String runUrl) The results of a run: the result of the run itself, followed by the results of the stages of a Pipeline build.static StringcomputeFinishedTimeStamp(Run<?, ?> run) computeStageCheckRuns(Jenkins jenkins, PatchSetId ps, Run<?, ?> run, CheckRun parent, String runUrl) Computes the check runs of the stages of a Pipeline build, which are to be added next to the check run of the run itself.static List<CheckResult> computeStageResults(Jenkins jenkins, Run<?, ?> run, String runUrl) Computes the results of the stages of a Pipeline build, which are to be added to the results of the run itself.static io.jenkins.plugins.gerritchecksapi.rest.CheckRun.RunStatuscomputeStatus(Run<?, ?> run) abstract CheckRuncreate(PatchSetId ps, Job<?, ?> job, Run<?, ?> run, int attempt) protected StringgetAbsoluteRunUrl(Run<?, ?> run)
-
Constructor Details
-
AbstractCheckRunFactory
public AbstractCheckRunFactory()
-
-
Method Details
-
create
-
computeActions
-
computeStatus
public static io.jenkins.plugins.gerritchecksapi.rest.CheckRun.RunStatus computeStatus(Run<?, ?> run) -
computeFinishedTimeStamp
-
computeCheckResults
-
computeCheckResults
public static List<CheckResult> computeCheckResults(Jenkins jenkins, Run<?, ?> run, String resultIdPrefix, String runUrl) The results of a run: the result of the run itself, followed by the results of the stages of a Pipeline build.- Parameters:
resultIdPrefix- prefix of the result ID, which has to be unique within the CheckRun. The ID the CheckRun was created with is used for it.
-
computeCheckResults
public static List<CheckResult> computeCheckResults(Run<?, ?> run, String resultIdPrefix, String runUrl) The result of the run itself. The stages of a Pipeline build are results of their own, whichcomputeCheckResults(Jenkins, Run, String, String)adds to it. A run that is still building has no result of its own yet.- Parameters:
resultIdPrefix- prefix of the result ID, which has to be unique within the CheckRun. The ID the CheckRun was created with is used for it.
-
computeStageResults
Computes the results of the stages of a Pipeline build, which are to be added to the results of the run itself. Stages that are reported as check runs of their own are not results of the run, seecomputeStageCheckRuns(jenkins.model.Jenkins, io.jenkins.plugins.gerritchecksapi.PatchSetId, hudson.model.Run<?, ?>, io.jenkins.plugins.gerritchecksapi.rest.CheckRun, java.lang.String).- Returns:
- the results of the stages, or an empty list for runs that are not Pipeline builds, for Jenkins instances without Pipeline installed, for the stages that are reported as check runs, and for the builds whose stages are reported once they have finished only
-
computeStageCheckRuns
public static List<CheckRun> computeStageCheckRuns(Jenkins jenkins, PatchSetId ps, Run<?, ?> run, CheckRun parent, String runUrl) Computes the check runs of the stages of a Pipeline build, which are to be added next to the check run of the run itself.- Parameters:
parent- the check run of the run itself- Returns:
- the check runs of the stages, or an empty list for runs that are not Pipeline builds, for Jenkins instances without Pipeline installed, for the stages that are reported as results of their run, and for the builds whose stages are reported once they have finished only
-
childId
The ID of a check run that is a child of another one, e.g. a downstream build. The parent and the run parts are the runs' externalizable IDs. -
getAbsoluteRunUrl
-