Skip to main content

File Manipulation - Compress Files

Overview​

Compress one or multiples files into a single archive using ZIP, TAR, TAR.GZIP, or TAR.BZ2 compression methods.

The match type selected greatly affects how this Blueprint works.


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 to use on the provided files.
Local Folder NameMANIPULATION_SOURCE_FOLDER_NAMEAlphanumericβž–--Name of the local folder on Shipyard where the target file lives. If left blank, will look in the home directory.
Local File Name Match TypeMANIPULATION_SOURCE_FILE_NAME_MATCH_TYPESelectβœ…exact_matchExact Match: exact_match

Regex Match: regex_match

Determines if the text in "Local File Name" will look for one file with exact match, or multiple files using regex.
Local File NameMANIPULATION_SOURCE_FILE_NAMEAlphanumericβœ…--Name of the target file on Shipyard. Can be regex if "Match Type" is set accordingly.
New Folder NameMANIPULATION_DESTINATION_FOLDER_NAMEAlphanumericβž–--Folder where the newly compressed file should be created on Shipyard. Leaving blank will place the file in the home directory. If the folder does not already exist, it will be created.
New File NameMANIPULATION_DESTINATION_FILE_NAMEAlphanumericβœ…Archive.zip-What to name the newly compressed file on Shipyard. It is recommended to end this name with the same extension as the compression type chosen.

YAML​

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

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