Skip to content

Add utility class to decompress archive files #2456

@rohanKanojia

Description

@rohanKanojia

Component

JKube Kit

Task description

Part of #439

Related to #2454

As a JKube developer, I want to be able to let JKube extract a downloaded tar-gzipped or zip archive containing a Buildpacks CLI (pack) for my platform and system architecture to the specified directory, so that I can invoke a consistent version of the CLI tool (see #2453).

The required archive types for decompression should be:

  • tar gzipped archives .tgz
  • zip archives .zip

Implementation

Utility should be implemented in the org.eclipse.jkube.kit.common.archive package of the jkube-kit-common module.

The utility should provide a extractArchive(File inputFile, File targetDirectory).

For the Buildpacks CLI case, we should consider if the archive wraps a directory and see how to take care of this in order to locate the binary (probably belongs to #2454).

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions