Interface ArtifactFileManager
- All Known Implementing Classes:
DefaultArtifactFileManager
public interface ArtifactFileManager
A wrapper around the
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidarchiveWorkspaceArtifact(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-inarchiveArtifactsstep) so it can be retrieved later, e.g.retrieveArtifact(String artifactPath) Retrieves the given artifact from the Jenkins Master-NodevoidstoreArtifact(TemporaryFile artifact, String targetArtifactPath) Stores the given artifact from the temporary file on the Jenkins Master-Node
-
Method Details
-
retrieveArtifact
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 fielArtifactNotFoundException- 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 JenkinstargetArtifactPath- the target path of the artifact- Throws:
IOException- occurs if something goes wrong with storing the artifact on JenkinsInterruptedException- occurs if something goes wrong with storing the artifact on JenkinsNoSuchAlgorithmException- 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-inarchiveArtifactsstep) so it can be retrieved later, e.g. by the SignPath Pipeline Connector.- Parameters:
workspace- the agent workspace rootrelativePath- the artifact path relative to the workspace root; also used as the archived path- Throws:
IOException- occurs if something goes wrong while archivingInterruptedException- occurs if the archiving is interrupted
-