public class ArtifactArchiver extends Recorder implements SimpleBuildStep
Modifier and Type | Class and Description |
---|---|
static class |
ArtifactArchiver.DescriptorImpl |
static class |
ArtifactArchiver.Migrator |
Publisher.DescriptorExtensionListImpl
SimpleBuildStep.LastBuildAction, SimpleBuildStep.LastBuildActionFactory
BuildStep.PublisherList
ExtensionPoint.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 |
isFollowSymlinks() |
boolean |
isLatestOnly()
Deprecated.
|
boolean |
isOnlyIfSuccessful() |
void |
perform(Run<?,?> build,
FilePath ws,
EnvVars environment,
Launcher launcher,
TaskListener listener)
Run this step.
|
protected 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 |
setFollowSymlinks(boolean followSymlinks) |
void |
setOnlyIfSuccessful(boolean onlyIfSuccessful) |
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
@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)
protected Object readResolve()
public String getArtifacts()
@CheckForNull public String getExcludes()
@DataBoundSetter public final void setExcludes(@CheckForNull 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 boolean isFollowSymlinks()
@DataBoundSetter public final void setFollowSymlinks(boolean followSymlinks)
public void perform(Run<?,?> build, FilePath ws, EnvVars environment, Launcher launcher, TaskListener listener) throws IOException, 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 ofws
- a workspace to use for any file operationsenvironment
- environment variables applicable to this steplauncher
- a way to start processeslistener
- a place to send outputIOException
- if something goes wrong; use AbortException
for a polite errorInterruptedException
- 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.
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
Copyright © 2004–2021. All rights reserved.