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.DescriptorExtensionListImplSimpleBuildStep.LastBuildAction, SimpleBuildStep.LastBuildActionFactoryBuildStep.PublisherListExtensionPoint.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 |
getRecordBuildArtifacts()
Deprecated.
|
BuildStepMonitor |
getRequiredMonitorService()
Declares the scope of the synchronization monitor this
BuildStep expects from outside. |
String |
getTargets() |
void |
perform(Run<?,?> build,
FilePath workspace,
Launcher launcher,
TaskListener listener)
Run this step.
|
getDescriptorall, getProjectAction, needsToRunAfterFinalized, prebuildgetProjectAction, getProjectActions, perform, perform, prebuildclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetProjectAction, getProjectActions, perform, prebuildpublic static boolean enableFingerprintsInDependencyGraph
@DataBoundConstructor public Fingerprinter(String targets)
@Deprecated public Fingerprinter(String targets, boolean recordBuildArtifacts)
public String getTargets()
@Deprecated public boolean getRecordBuildArtifacts()
public void perform(Run<?,?> build, FilePath workspace, Launcher launcher, TaskListener listener) throws InterruptedException
SimpleBuildStepperform in interface SimpleBuildStepbuild - a build this is running as a part ofworkspace - a workspace to use for any file operationslauncher - a way to start processeslistener - a place to send outputInterruptedException - if the step is interruptedpublic BuildStepMonitor getRequiredMonitorService()
BuildStepBuildStep 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
CheckPoints
to perform necessary synchronizations.
If you are migrating BuildStep implementations written for earlier versions of Hudson,
here's what you can do:
BuildStepMonitor.BUILD to demand the backward compatible behavior from Hudson,
and make no other changes to the code. This will prevent users from reaping the benefits of concurrent
builds, but at least your plugin will work correctly, and therefore this is a good easy first step.
Run.getPreviousBuild()), then you can return BuildStepMonitor.NONE without making further
code changes and you are done with migration.
Actions 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
CheckPoints directly in your code. The general idea is to call CheckPoint.block() before
you try to access the state from the previous build.
For plugins written against earlier versions of Hudson, calling this method results in
AbstractMethodError.
getRequiredMonitorService in interface BuildSteppublic void buildDependencyGraph(AbstractProject owner, DependencyGraph graph)
DependencyDeclarerAbstractProject.buildDependencyGraph(DependencyGraph).buildDependencyGraph in interface DependencyDeclarerowner - 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 © 2019. All rights reserved.