Discover Packages
github.com/harness-community/drone-archive
command
module
Version:
v0.0.1
Opens a new window with list of versions in this module.
Published: Sep 24, 2024
License: Apache-2.0
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
README
¶
archive-plugin
Synopsis
This repository contains a plugin for running archive functionalities like zip/tar/gzip.
Plugin Image
The plugin plugins/archive
is available for the following architectures:
OS
Tag
latest
latest
linux/amd64
linux-amd64
linux/arm64
linux-arm64
windows/amd64
windows-amd64
Parameters
Parameter
Comments
source required
source path
target required
target path
format required
zip/tar/gzip
action required
archive or extract
tarcompress optional
true or false (compression for tar)
glob optional
Ant style pattern of files to extract/archive from the zip/tar. Leave empty to include all files and directories.
exclude optional
Ant style pattern of files to exclude from the zip/tar.
overwrite optional
true of false
Building
Build the plugin image:
./scripts/build.sh
Examples
docker run \
-e PLUGIN_SOURCE=/data/source \
-e PLUGIN_TARGET=/data/backup/archive.zip \
-e PLUGIN_FORMAT=zip \
-e PLUGIN_ACTION=archive \
-e PLUGIN_OVERWRITE=true \
-e PLUGIN_EXCLUDE="*.log" \
-e PLUGIN_GLOB="**/*.txt" \
plugins/archive
docker run \
-e PLUGIN_SOURCE=/data/backup/archive.zip \
-e PLUGIN_TARGET=/data/source \
-e PLUGIN_FORMAT=zip \
-e PLUGIN_ACTION=extract \
-e PLUGIN_OVERWRITE=true \
-e PLUGIN_GLOB="**/*.txt" \
plugins/archive
docker run \
-e PLUGIN_SOURCE=/data/source \
-e PLUGIN_TARGET=/data/backup/archive.tar \
-e PLUGIN_FORMAT=tar \
-e PLUGIN_ACTION=archive \
-e PLUGIN_OVERWRITE=true \
-e PLUGIN_EXCLUDE="*.log" \
-e PLUGIN_GLOB="**/*.txt" \
-e PLUGIN_TARCOMPRESS=false \
plugins/archive
docker run \
-e PLUGIN_SOURCE=/data/backup/archive.tar \
-e PLUGIN_TARGET=/data/source \
-e PLUGIN_FORMAT=tar \
-e PLUGIN_ACTION=extract \
-e PLUGIN_OVERWRITE=true \
-e PLUGIN_GLOB="**/*.txt" \
plugins/archive
docker run \
-e PLUGIN_SOURCE=/data/source \
-e PLUGIN_TARGET=/data/backup/archive.tar.gz \
-e PLUGIN_FORMAT=tar \
-e PLUGIN_ACTION=archive \
-e PLUGIN_OVERWRITE=true \
-e PLUGIN_TARCOMPRESS=true \
-e PLUGIN_EXCLUDE="*.log" \
-e PLUGIN_GLOB="**/*.txt" \
plugins/archive
# Plugin YAML
- step:
type: Plugin
name: archive-plugin-arm64
identifier: archive-plugin-arm64
spec:
connectorRef: harness-docker-connector
image: plugins/archive:linux-arm64
settings:
source: path/to/source
target: targetpath
format: zip/tar/gzip
action: archive or extract
glob: Some ant style pattern to include those files
exclude: Some ant style pattern to exclude those files
overwrite: true/false
Expand ▾
Collapse ▴
Documentation
¶
There is no documentation for this package.
Source Files
¶
Directories
¶
Click to show internal directories.
Click to hide internal directories.