public class ArtifactArchiver extends Recorder implements SimpleBuildStep
| Modifier and Type | Class and Description |
|---|---|
static class |
ArtifactArchiver.DescriptorImpl |
static class |
ArtifactArchiver.Migrator |
Publisher.DescriptorExtensionListImplSimpleBuildStep.LastBuildAction, SimpleBuildStep.LastBuildActionFactoryBuildStep.PublisherListExtensionPoint.LegacyInstancesAreScopedToHudson| Modifier and Type | Field and Description |
|---|---|
static ArtifactArchiver.DescriptorImpl |
DESCRIPTOR
Deprecated.
as of 1.286
Some plugin depends on this, so this field is left here and points to the last created instance.
Use
Jenkins.getDescriptorByType(Class) instead. |
BUILDERS, PUBLISHERS| Constructor and Description |
|---|
ArtifactArchiver(String artifacts) |
ArtifactArchiver(String artifacts,
String excludes,
boolean latestOnly)
Deprecated.
|
ArtifactArchiver(String artifacts,
String excludes,
boolean latestOnly,
boolean allowEmptyArchive)
Deprecated.
|
ArtifactArchiver(String artifacts,
String excludes,
boolean latestOnly,
boolean allowEmptyArchive,
boolean onlyIfSuccessful)
Deprecated.
|
ArtifactArchiver(String artifacts,
String excludes,
boolean latestOnly,
boolean allowEmptyArchive,
boolean onlyIfSuccessful,
Boolean defaultExcludes)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
getAllowEmptyArchive() |
String |
getArtifacts() |
String |
getExcludes() |
BuildStepMonitor |
getRequiredMonitorService()
Declares the scope of the synchronization monitor this
BuildStep expects from outside. |
boolean |
isCaseSensitive() |
boolean |
isDefaultExcludes() |
boolean |
isFingerprint() |
boolean |
isLatestOnly()
Deprecated.
|
boolean |
isOnlyIfSuccessful() |
void |
perform(Run<?,?> build,
FilePath ws,
Launcher launcher,
TaskListener listener)
Run this step.
|
Object |
readResolve() |
void |
setAllowEmptyArchive(boolean allowEmptyArchive) |
void |
setCaseSensitive(boolean caseSensitive) |
void |
setDefaultExcludes(boolean defaultExcludes) |
void |
setExcludes(String excludes) |
void |
setFingerprint(boolean fingerprint)
Whether to fingerprint the artifacts after we archive them.
|
void |
setOnlyIfSuccessful(boolean onlyIfSuccessful) |
getDescriptorall, getProjectAction, needsToRunAfterFinalized, prebuildgetProjectAction, getProjectActions, perform, perform, prebuildclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetProjectAction, getProjectActions, perform, prebuild@Deprecated public static volatile ArtifactArchiver.DescriptorImpl DESCRIPTOR
Jenkins.getDescriptorByType(Class) instead.@DataBoundConstructor public ArtifactArchiver(String artifacts)
@Deprecated public ArtifactArchiver(String artifacts, String excludes, boolean latestOnly)
@Deprecated public ArtifactArchiver(String artifacts, String excludes, boolean latestOnly, boolean allowEmptyArchive)
@Deprecated public ArtifactArchiver(String artifacts, String excludes, boolean latestOnly, boolean allowEmptyArchive, boolean onlyIfSuccessful)
@Deprecated public ArtifactArchiver(String artifacts, String excludes, boolean latestOnly, boolean allowEmptyArchive, boolean onlyIfSuccessful, Boolean defaultExcludes)
public Object readResolve()
public String getArtifacts()
public String getExcludes()
@DataBoundSetter public final void setExcludes(String excludes)
@Deprecated public boolean isLatestOnly()
public boolean isOnlyIfSuccessful()
@DataBoundSetter public final void setOnlyIfSuccessful(boolean onlyIfSuccessful)
public boolean isFingerprint()
@DataBoundSetter public void setFingerprint(boolean fingerprint)
public boolean getAllowEmptyArchive()
@DataBoundSetter public final void setAllowEmptyArchive(boolean allowEmptyArchive)
public boolean isDefaultExcludes()
@DataBoundSetter public final void setDefaultExcludes(boolean defaultExcludes)
public boolean isCaseSensitive()
@DataBoundSetter public final void setCaseSensitive(boolean caseSensitive)
public void perform(Run<?,?> build, FilePath ws, Launcher launcher, TaskListener listener) throws InterruptedException
SimpleBuildStepperform in interface SimpleBuildStepbuild - a build this is running as a part ofws - 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 BuildStepCopyright © 2019. All rights reserved.