public class Fingerprinter extends Recorder implements Serializable, DependencyDeclarer, SimpleBuildStep
Modifier and Type | Class and Description |
---|---|
static class |
Fingerprinter.DescriptorImpl |
static class |
Fingerprinter.FingerprintAction
Action for displaying fingerprints.
|
Publisher.DescriptorExtensionListImpl
SimpleBuildStep.LastBuildAction, SimpleBuildStep.LastBuildActionFactory
BuildStep.PublisherList
ExtensionPoint.LegacyInstancesAreScopedToHudson
Modifier and Type | Field and Description |
---|---|
static boolean |
enableFingerprintsInDependencyGraph |
BUILDERS, PUBLISHERS
Constructor and Description |
---|
Fingerprinter(String targets) |
Fingerprinter(String targets,
boolean recordBuildArtifacts)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
buildDependencyGraph(AbstractProject owner,
DependencyGraph graph)
Invoked from
AbstractProject.buildDependencyGraph(DependencyGraph) . |
boolean |
getCaseSensitive() |
boolean |
getDefaultExcludes() |
String |
getExcludes() |
boolean |
getRecordBuildArtifacts()
Deprecated.
|
BuildStepMonitor |
getRequiredMonitorService()
Declares the scope of the synchronization monitor this
BuildStep expects from outside. |
String |
getTargets() |
void |
perform(Run<?,?> build,
FilePath workspace,
EnvVars environment,
Launcher launcher,
TaskListener listener)
Run this step.
|
void |
setCaseSensitive(boolean caseSensitive) |
void |
setDefaultExcludes(boolean defaultExcludes) |
void |
setExcludes(String excludes) |
getDescriptor
all, getProjectAction, needsToRunAfterFinalized, prebuild
getProjectAction, getProjectActions, perform, perform, prebuild
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
perform, perform, requiresWorkspace
getProjectAction, getProjectActions, perform, prebuild
public static boolean enableFingerprintsInDependencyGraph
@DataBoundConstructor public Fingerprinter(String targets)
@Deprecated public Fingerprinter(String targets, boolean recordBuildArtifacts)
Fingerprinter(String)
and ArtifactArchiver.setFingerprint(boolean)
@DataBoundSetter public void setExcludes(String excludes)
@DataBoundSetter public void setDefaultExcludes(boolean defaultExcludes)
@DataBoundSetter public void setCaseSensitive(boolean caseSensitive)
public String getTargets()
public String getExcludes()
public boolean getDefaultExcludes()
public boolean getCaseSensitive()
@Deprecated public boolean getRecordBuildArtifacts()
ArtifactArchiver.isFingerprint()
public void perform(Run<?,?> build, FilePath workspace, EnvVars environment, Launcher launcher, TaskListener listener) throws InterruptedException
SimpleBuildStep
This method must be overridden when this step requires a workspace context. If such a context is
not required, it does not need to be overridden; it will then forward to
SimpleBuildStep.perform(Run, EnvVars, TaskListener)
.
perform
in interface SimpleBuildStep
build
- a build this is running as a part ofworkspace
- a workspace to use for any file operationsenvironment
- environment variables applicable to this steplauncher
- a way to start processeslistener
- a place to send outputInterruptedException
- if the step is interruptedpublic BuildStepMonitor getRequiredMonitorService()
BuildStep
BuildStep
expects from outside.
This method is introduced for preserving compatibility with plugins written for earlier versions of Hudson, which never run multiple builds of the same job in parallel. Such plugins often assume that the outcome of the previous build is completely available, which is no longer true when we do concurrent builds.
To minimize the necessary code change for such plugins, BuildStep
implementations can request
Hudson to externally perform synchronization before executing them. This behavior is as follows:
BuildStepMonitor.BUILD
BuildStep
is only executed after the previous build is fully
completed (thus fully restoring the earlier semantics of one build at a time.)
BuildStepMonitor.STEP
BuildStep
is only executed after the same step in the previous build is completed.
For build steps that use a weaker assumption and only rely on the output from the same build step of
the early builds, this improves the concurrency.
BuildStepMonitor.NONE
CheckPoint
s
to perform necessary synchronizations.
Migrating Older Implementations:
If you are migrating BuildStep
implementations written for earlier versions of Hudson,
here's what you can do:
Run.getPreviousBuild()
), then you can return BuildStepMonitor.NONE
without making further
code changes and you are done with migration.
Action
s that you added in the previous build by yourself,
then you only need BuildStepMonitor.STEP
scope synchronization. Return it from this method
,and you are done with migration without any further code changes.
BuildStepMonitor.NONE
and use
CheckPoint
s directly in your code. The general idea is to call CheckPoint.block()
before
you try to access the state from the previous build.
getRequiredMonitorService
in interface BuildStep
public void buildDependencyGraph(AbstractProject owner, DependencyGraph graph)
DependencyDeclarer
AbstractProject.buildDependencyGraph(DependencyGraph)
.buildDependencyGraph
in interface DependencyDeclarer
owner
- The project that owns the publishers, builders, etc.
This information is conceptually redundant, as those objects are
only configured against the single owner, but this information is
nevertheless passed in since often owner information is not recorded.
Never null.graph
- The dependency graph being built. Never null.Copyright © 2004–2022. All rights reserved.