Categorygithub.com/joseluisq/drone-archive
repositorypackage
1.1.0
Repository: https://github.com/joseluisq/drone-archive.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# README

Drone Archive Plugin

Build Status codecov Go Report Card PkgGoDev Docker Image Version (tag latest semver) Docker Image Size (tag) Docker Image

Drone plugin that provides Tar/Gzip and Zip archiving with optional checksum computation.

Usage

---
kind: pipeline
type: docker
name: production

platform:
  os: linux
  arch: amd64

steps:
- name: archive
  image: joseluisq/drone-archive
  settings:
    format: tar
    src_base_path: ./my-base-path
    src: ./release/myprogram
    dest: ./myprogram.tar.gz
    checksum: true
    checksum_algo: sha256
    checksum_dest: myprogram.CHECKSUM.tar.gz.txt

API

$ drone-archive --help
# NAME: archive plugin [OPTIONS] COMMAND
#
# Archive a file or directory using Tar/Gzip or Zip with optional checksum computation.
#
# OPTIONS:
#   -b --src-base-path    Source base path directory which will be skipped for each archive file header. [env: PLUGIN_SRC_BASE_PATH]
#   -s --src              File or directory to archive and compress. [env: PLUGIN_SRC]
#   -d --dest             File destination path to save the archived/compressed file. [env: PLUGIN_DEST]
#   -f --format           Define a `tar` and `zip` archiving format with compression. Tar format uses Gzip compression. [default: tar] [env: PLUGIN_FORMAT]
#   -c --checksum         Enable checksum file computation. [default: false] [env: PLUGIN_CHECKSUM]
#   -a --checksum-algo    Define the checksum `md5`, `sha1`, `sha256` or `sha512` algorithm. [default: sha256] [env: PLUGIN_CHECKSUM_ALGO]
#   -e --checksum-dest    File destination path of the checksum. [env: PLUGIN_CHECKSUM_DEST]
#   -h --help             Prints help information
#   -v --version          Prints version information

Development

Test

make test

Build

Build the binaries and Docker image.

make build image.build

Run

Run Docker images examples.

make image.tar
# or
make image.zip

Contributions

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in current work by you, as defined in the Apache-2.0 license, shall be dual licensed as described below, without any additional terms or conditions.

Feel free to send some Pull request or issue.

License

This work is primarily distributed under the terms of both the MIT license and the Apache License (Version 2.0).

© 2020-present Jose Quintana