in src/main/java/com/amazonaws/codepipeline/jenkinsplugin/DownloadCallable.java [116:139]
private void downloadAndExtract(
final S3Object sessionObject,
final File workspace,
final String downloadedFileName,
final TaskListener listener) throws IOException {
downloadArtifacts(sessionObject, workspace, downloadedFileName, listener);
final File fullFilePath = new File(workspace, downloadedFileName);
try {
ExtractionTools.decompressFile(fullFilePath, workspace, model.getCompressionType(), listener);
LoggingHelper.log(listener, "Artifact uncompressed successfully");
} finally {
if (fullFilePath != null) {
try {
ExtractionTools.deleteTemporaryCompressedFile(fullFilePath);
} catch (final IOException ex) {
LoggingHelper.log(listener, "Could not delete temporary file: %s", ex.getMessage());
LoggingHelper.log(listener, ex);
}
}
}
}