Package jenkins.model

Class StandardArtifactManager

    • Field Detail

      • TAR_COMPRESSION

        @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
        public static FilePath.TarCompression TAR_COMPRESSION
      • build

        protected transient Run<?,​?> build
    • Constructor Detail

      • StandardArtifactManager

        public StandardArtifactManager​(Run<?,​?> build)
    • Method Detail

      • onLoad

        public final void onLoad​(Run<?,​?> build)
        Description copied from class: ArtifactManager
        Called when this manager is loaded from disk. The selected manager will be persisted inside a build, so the build reference should be transient (quasi-final) and restored here.
        Specified by:
        onLoad in class ArtifactManager
        Parameters:
        build - a historical build with which this manager was associated
      • archive

        public void archive​(FilePath workspace,
                            Launcher launcher,
                            BuildListener listener,
                            Map<String,​String> artifacts)
                     throws IOException,
                            InterruptedException
        Description copied from class: ArtifactManager
        Archive all configured artifacts from a build.

        If called multiple times for the same build, do not delete the old artifacts but keep them all, unless overwritten. For example, the XVNC plugin could use this to save screenshot.jpg if so configured.

        This method is typically invoked on a running build, though e.g. in the case of Maven module builds, the build may actually be Run.State.COMPLETED when this is called (since it is the parent build which is still running and performing archiving).

        Specified by:
        archive in class ArtifactManager
        Parameters:
        workspace - the root directory from which to copy files (typically AbstractBuild.getWorkspace() but not necessarily)
        launcher - a launcher to use if external processes need to be forked
        listener - a way to print messages about progress or problems
        artifacts - map from paths in the archive area to paths relative to workspace (all paths /-separated)
        Throws:
        IOException - if transfer or copying failed in any way
        InterruptedException - if transfer was interrupted
        See Also:
        SimpleBuildStep.perform(Run, FilePath, Launcher, TaskListener)