Class ReferenceBuild
java.lang.Object
io.jenkins.plugins.forensics.reference.ReferenceBuild
- All Implemented Interfaces:
Action,ModelObject,Serializable,RunAction2,org.kohsuke.stapler.StaplerProxy
public class ReferenceBuild
extends Object
implements RunAction2, Serializable, org.kohsuke.stapler.StaplerProxy
Stores the selected reference build for a given build. The reference build is a build in a different (or same)
Jenkins job that can be used to compute delta reports.
- Author:
- Ullrich Hafner
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringIndicates that no reference build has been found. -
Constructor Summary
ConstructorsConstructorDescriptionReferenceBuild(Run<?, ?> owner, List<String> messages) Deprecated.ReferenceBuild(Run<?, ?> owner, List<String> messages, Result requiredResult) Creates a new instance ofReferenceBuildthat indicates that no reference build has been found.ReferenceBuild(Run<?, ?> owner, List<String> messages, Result requiredResult, Run<?, ?> referenceBuild) Creates a new instance ofReferenceBuildthat points to the specified reference build.ReferenceBuild(Run<?, ?> owner, List<String> messages, Run<?, ?> referenceBuild) Deprecated.useReferenceBuild(Run, List, Result, Run)instead -
Method Summary
Modifier and TypeMethodDescriptionRun<?,?> getOwner()Returns the actual reference build.Returns the ID of the reference build.static StringgetReferenceBuildLink(String referenceBuildId) Returns a link that can be used in Jelly views to navigate to the reference build.Returns a link that can be used in Jelly views to navigate to the reference build.Returns the required build result of the chosen reference build.Returns the detail view for the messages captured during the computation of the reference build.booleanDetermines if a reference build has been recorded or not.voidonAttached(Run<?, ?> run) voidprotected ObjectCalled after deserialization to retain backward compatibility.
-
Field Details
-
NO_REFERENCE_BUILD
Indicates that no reference build has been found. Note that this value is not used when the build has been found initially but has been deleted afterward.- See Also:
-
-
Constructor Details
-
ReferenceBuild
Creates a new instance ofReferenceBuildthat indicates that no reference build has been found.- Parameters:
owner- the current run as the owner of this actionmessages- messages that show the steps the resolution processrequiredResult- the required build result of the chosen reference build
-
ReferenceBuild
public ReferenceBuild(Run<?, ?> owner, List<String> messages, Result requiredResult, Run<?, ?> referenceBuild) Creates a new instance ofReferenceBuildthat points to the specified reference build.- Parameters:
owner- the current build as the owner of this actionmessages- messages that show the steps of the resolution processrequiredResult- the required build result of the chosen reference buildreferenceBuild- the found reference build
-
ReferenceBuild
Deprecated.useReferenceBuild(Run, List, Result)insteadCreates a new instance ofReferenceBuildthat indicates that no reference build has been found.- Parameters:
owner- the current run as the owner of this actionmessages- messages that show the steps the resolution process
-
ReferenceBuild
Deprecated.useReferenceBuild(Run, List, Result, Run)insteadCreates a new instance ofReferenceBuildthat points to the specified reference build.- Parameters:
owner- the current build as the owner of this actionmessages- messages that show the steps of the resolution processreferenceBuild- the found reference build
-
-
Method Details
-
getReferenceBuildLink
Returns a link that can be used in Jelly views to navigate to the reference build.- Parameters:
referenceBuildId- ID of the reference build- Returns:
- the link
-
readResolve
Called after deserialization to retain backward compatibility.- Returns:
- this
-
onAttached
- Specified by:
onAttachedin interfaceRunAction2
-
onLoad
- Specified by:
onLoadin interfaceRunAction2
-
getOwner
-
getMessages
-
getReferenceLink
Returns a link that can be used in Jelly views to navigate to the reference build.- Returns:
- the link
-
hasReferenceBuild
public boolean hasReferenceBuild()Determines if a reference build has been recorded or not.- Returns:
trueif a reference build has been recorded,falseif not
-
getReferenceBuildId
Returns the ID of the reference build. If no reference build is available, then the constant stringNO_REFERENCE_BUILDwill be returned.- Returns:
- the ID of the reference build
-
getReferenceBuild
Returns the actual reference build. Note that a reference build might be not available anymore, because it has been deleted in the meantime.- Returns:
- the reference build, if still available
-
getRequiredResult
Returns the required build result of the chosen reference build.- Returns:
- the required build result
-
getDisplayName
- Specified by:
getDisplayNamein interfaceAction- Specified by:
getDisplayNamein interfaceModelObject
-
getIconFileName
- Specified by:
getIconFileNamein interfaceAction
-
getUrlName
- Specified by:
getUrlNamein interfaceAction
-
getTarget
Returns the detail view for the messages captured during the computation of the reference build.- Specified by:
getTargetin interfaceorg.kohsuke.stapler.StaplerProxy- Returns:
- the detail view for the messages
-
ReferenceBuild(Run, List, Result)instead