Interface ArtifactFileManager

All Known Implementing Classes:
DefaultArtifactFileManager

public interface ArtifactFileManager
A wrapper around the
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    archiveWorkspaceArtifact(FilePath workspace, String relativePath)
    Archives a file that lives in the agent workspace, streaming it from the agent to the build's archived artifacts (the same mechanism as the built-in archiveArtifacts step) so it can be retrieved later, e.g.
    retrieveArtifact(String artifactPath)
    Retrieves the given artifact from the Jenkins Master-Node
    void
    storeArtifact(TemporaryFile artifact, String targetArtifactPath)
    Stores the given artifact from the temporary file on the Jenkins Master-Node
  • Method Details

    • retrieveArtifact

      TemporaryFile retrieveArtifact(String artifactPath) throws IOException, ArtifactNotFoundException
      Retrieves the given artifact from the Jenkins Master-Node
      Parameters:
      artifactPath - the artifact path in the "Jenkins-Format" i.e. abc/def/new.exe
      Returns:
      the temporary file containing the artifact content
      Throws:
      IOException - occurs if something went wrong with creating the temporary fiel
      ArtifactNotFoundException - occurs if there was no artifact found at the given path
    • storeArtifact

      void storeArtifact(TemporaryFile artifact, String targetArtifactPath) throws IOException, InterruptedException, NoSuchAlgorithmException
      Stores the given artifact from the temporary file on the Jenkins Master-Node
      Parameters:
      artifact - the artifact to store on Jenkins
      targetArtifactPath - the target path of the artifact
      Throws:
      IOException - occurs if something goes wrong with storing the artifact on Jenkins
      InterruptedException - occurs if something goes wrong with storing the artifact on Jenkins
      NoSuchAlgorithmException - occurs if something goes wrong with storing the artifact on Jenkins
    • archiveWorkspaceArtifact

      void archiveWorkspaceArtifact(FilePath workspace, String relativePath) throws IOException, InterruptedException
      Archives a file that lives in the agent workspace, streaming it from the agent to the build's archived artifacts (the same mechanism as the built-in archiveArtifacts step) so it can be retrieved later, e.g. by the SignPath Pipeline Connector.
      Parameters:
      workspace - the agent workspace root
      relativePath - the artifact path relative to the workspace root; also used as the archived path
      Throws:
      IOException - occurs if something goes wrong while archiving
      InterruptedException - occurs if the archiving is interrupted