Class GitReferenceRecorder
java.lang.Object
hudson.tasks.BuildStepCompatibilityLayer
hudson.tasks.Publisher
hudson.tasks.Recorder
io.jenkins.plugins.forensics.reference.SimpleReferenceRecorder
io.jenkins.plugins.forensics.reference.ReferenceRecorder
io.jenkins.plugins.forensics.git.reference.GitReferenceRecorder
- All Implemented Interfaces:
ExtensionPoint,Describable<Publisher>,BuildStep,SimpleBuildStep
public class GitReferenceRecorder
extends io.jenkins.plugins.forensics.reference.ReferenceRecorder
Recorder that finds a reference build that matches best with the current build of a given Git branch.
- Author:
- Arne Schöntag, Ullrich Hafner
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classDescriptor for this step: defines the symbol for the pipeline.Nested classes/interfaces inherited from class io.jenkins.plugins.forensics.reference.SimpleReferenceRecorder
io.jenkins.plugins.forensics.reference.SimpleReferenceRecorder.SimpleReferenceRecorderDescriptorNested classes/interfaces inherited from class hudson.tasks.Publisher
Publisher.DescriptorExtensionListImplNested classes/interfaces inherited from interface hudson.tasks.BuildStep
BuildStep.PublisherListNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudsonNested classes/interfaces inherited from interface jenkins.tasks.SimpleBuildStep
SimpleBuildStep.LastBuildAction, SimpleBuildStep.LastBuildActionFactory -
Field Summary
Fields inherited from interface hudson.tasks.BuildStep
BUILDERS, PUBLISHERS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintbooleanvoidsetMaxCommits(int maxCommits) Sets the maximal number of additional commits in the reference job that will be considered during the comparison with the current branch.voidsetSkipUnknownCommits(boolean skipUnknownCommits) If enabled, then a build of the reference job will be skipped if one of the commits is unknown in the current branch.Methods inherited from class io.jenkins.plugins.forensics.reference.ReferenceRecorder
findReferenceBuild, findTargetBranchHead, getScm, getTargetBranch, isLatestBuildIfNotFound, setLatestBuildIfNotFound, setScm, setTargetBranchMethods inherited from class io.jenkins.plugins.forensics.reference.SimpleReferenceRecorder
createEmptyReferenceBuild, findJob, getLastBuild, getReferenceBuildWithRequiredStatus, getReferenceJob, getRequiredBuildResult, getRequiredMonitorService, getRequiredResult, hasRequiredResult, isConsiderRunningBuild, logNoBuildFound, perform, readResolve, resolveReferenceJob, setConsiderRunningBuild, setReferenceJob, setRequiredBuildResult, setRequiredResultMethods inherited from class hudson.tasks.Publisher
all, getProjectAction, needsToRunAfterFinalized, prebuildMethods inherited from class hudson.tasks.BuildStepCompatibilityLayer
getProjectAction, getProjectActions, perform, perform, prebuildMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface hudson.tasks.BuildStep
getProjectAction, getProjectActions, perform, prebuildMethods inherited from interface jenkins.tasks.SimpleBuildStep
perform, perform, requiresWorkspace
-
Constructor Details
-
GitReferenceRecorder
@DataBoundConstructor public GitReferenceRecorder()Creates a new instance ofGitReferenceRecorder.
-
-
Method Details
-
setMaxCommits
@DataBoundSetter public void setMaxCommits(int maxCommits) Sets the maximal number of additional commits in the reference job that will be considered during the comparison with the current branch. To avoid an indefinite scanning of the build history until a matching reference has been found, this value is used as a stop criteria.- Parameters:
maxCommits- maximal number of commits
-
getMaxCommits
public int getMaxCommits() -
setSkipUnknownCommits
@DataBoundSetter public void setSkipUnknownCommits(boolean skipUnknownCommits) If enabled, then a build of the reference job will be skipped if one of the commits is unknown in the current branch.- Parameters:
skipUnknownCommits- iftruethen builds with unknown commits will be skipped, otherwise unknown commits will be ignored
-
isSkipUnknownCommits
public boolean isSkipUnknownCommits() -
find
protected Optional<Run<?,?>> find(Run<?, ?> owner, Run<?, ?> lastCompletedBuildOfReferenceJob, edu.hm.hafner.util.FilteredLog log) - Overrides:
findin classio.jenkins.plugins.forensics.reference.ReferenceRecorder
-
getDescriptor
- Specified by:
getDescriptorin interfaceDescribable<Publisher>- Overrides:
getDescriptorin classio.jenkins.plugins.forensics.reference.SimpleReferenceRecorder
-