Interface StashManager.StashAwareArtifactManager
- Enclosing class:
- StashManager
public static interface StashManager.StashAwareArtifactManager
Mixin interface for an
ArtifactManager
which supports specialized stash behavior as well.
When implementing off-Jenkins artifact storage, you should NOT extend this directly but instead use the
JCloudsArtifactManager
in the plugin currently named artifact-manager-s3
.
This is dangerous to directly extend if using remote storage unless you write a very robust handling of network failures including at least a base timeout and retries.
The JCloudsArtifactManager
implementation supports extensibility to various cloud providers and custom stores via the BlobStoreProvider
ExtensionPoint.
It handles all aspects of making cloud artifact storage work smoothly in Jenkins
including the VirtualFile
implementation, robust network error handling, overall configuration UI, and more.
Implement this interface directly at your own risk.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clearAllStashes
(TaskListener listener) void
copyAllArtifactsAndStashes
(Run<?, ?> to, TaskListener listener) Copy all stashes and artifacts from one build to another.void
stash
(String name, FilePath workspace, Launcher launcher, EnvVars env, TaskListener listener, String includes, String excludes, boolean useDefaultExcludes, boolean allowEmpty) void
-
Method Details
-
stash
void stash(@NonNull String name, @NonNull FilePath workspace, @NonNull Launcher launcher, @NonNull EnvVars env, @NonNull TaskListener listener, @CheckForNull String includes, @CheckForNull String excludes, boolean useDefaultExcludes, boolean allowEmpty) throws IOException, InterruptedException -
unstash
void unstash(@NonNull String name, @NonNull FilePath workspace, @NonNull Launcher launcher, @NonNull EnvVars env, @NonNull TaskListener listener) throws IOException, InterruptedException -
clearAllStashes
- Throws:
IOException
InterruptedException
- See Also:
-
copyAllArtifactsAndStashes
void copyAllArtifactsAndStashes(@NonNull Run<?, ?> to, @NonNull TaskListener listener) throws IOException, InterruptedExceptionCopy all stashes and artifacts from one build to another. TheArtifactManager
configuration will be as of the origin build. If the implementation cannot handleto
for whatever reason, it may throwAbortException
.- Throws:
IOException
InterruptedException
- See Also:
-