Skip to main content

File Manipulation - Decompress Files

Overview​

Decompress a single archive using ZIP, TAR, TAR.GZIP, or TAR.BZ2 into a single folder containing all compressed files.

Be sure you know what type of compression was used on the file originally! There are many instances where a file might end in .zip but be compressed using .gzip (or other methods).

If the archive contains only a single file, the New File Name field can be used to rename it. Otherwise, if the archive contains multiple files, it is recommended to leave this field blank to retain the original file and folder names.


For more information on how to use this Blueprint, read the documentation. You can also dig into the open-source code on Github.

Variables​

NameReferenceTypeRequiredDefaultOptionsDescription
Compression TypeMANIPULATION_COMPRESSION_TYPESelectβœ…zip.zip: zip

.tar: tar

.tar.bz2: tar.bz2

.tar.gz: tar.gz

Type of compression used to decompress the archive.
Local File NameMANIPULATION_SOURCE_FILE_NAMEAlphanumericβœ…Archive.zip-Name of the target compressed archive on Shipyard.
Local Folder NameMANIPULATION_SOURCE_FOLDER_NAMEAlphanumericβž–--Name of the local folder on Shipyard where the target compressed file lives. If left blank, will look in the home directory.
New File NameMANIPULATION_DESTINATION_FILE_NAMEAlphanumericβž–--What to name the newly decompressed file on Shipyard. Only takes effect if a single file is being decompressed.
New Folder NameMANIPULATION_DESTINATION_FOLDER_NAMEAlphanumericβž–--Folder where the newly decompressed file(s) should be created on Shipyard. Leaving blank will place the archive's contents in the home directory. If the folder does not already exist, it will be created.

YAML​

Below is the YAML template for this Blueprint and can be used in the Fleet YAML Editor.

source:
blueprint: File Manipulation - Decompress Files
inputs:
MANIPULATION_COMPRESSION_TYPE: zip ## REQUIRED
MANIPULATION_SOURCE_FILE_NAME: Archive.zip ## REQUIRED
MANIPULATION_SOURCE_FOLDER_NAME: null
MANIPULATION_DESTINATION_FILE_NAME: null
MANIPULATION_DESTINATION_FOLDER_NAME: null
type: BLUEPRINT
guardrails:
retry_count: 0
retry_wait: 0s
runtime_cutoff: 1h0m0s
exclude_exit_code_ranges:
- "0"