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 class
Descriptor 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.SimpleReferenceRecorderDescriptor
Nested classes/interfaces inherited from class hudson.tasks.Publisher
Publisher.DescriptorExtensionListImpl
Nested classes/interfaces inherited from interface hudson.tasks.BuildStep
BuildStep.PublisherList
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
Nested 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 TypeMethodDescriptionint
boolean
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.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.Methods inherited from class io.jenkins.plugins.forensics.reference.ReferenceRecorder
findReferenceBuild, findTargetBranchHead, getScm, getTargetBranch, isLatestBuildIfNotFound, setLatestBuildIfNotFound, setScm, setTargetBranch
Methods inherited from class io.jenkins.plugins.forensics.reference.SimpleReferenceRecorder
createEmptyReferenceBuild, findJob, getLastBuild, getReferenceBuildWithRequiredStatus, getReferenceJob, getRequiredMonitorService, getRequiredResult, hasRequiredResult, isConsiderRunningBuild, logNoBuildFound, perform, readResolve, resolveReferenceJob, setConsiderRunningBuild, setReferenceJob, setRequiredResult
Methods inherited from class hudson.tasks.Publisher
all, getProjectAction, needsToRunAfterFinalized, prebuild
Methods inherited from class hudson.tasks.BuildStepCompatibilityLayer
getProjectAction, getProjectActions, perform, perform, prebuild
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface hudson.tasks.BuildStep
getProjectAction, getProjectActions, perform, prebuild
Methods 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
- iftrue
then 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:
find
in classio.jenkins.plugins.forensics.reference.ReferenceRecorder
-
getDescriptor
- Specified by:
getDescriptor
in interfaceDescribable<Publisher>
- Overrides:
getDescriptor
in classio.jenkins.plugins.forensics.reference.SimpleReferenceRecorder
-