Giter Site home page Giter Site logo

joseluisq / drone-archive Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 32 KB

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

License: Apache License 2.0

Makefile 29.40% Go 56.78% Dockerfile 12.05% Shell 1.77%
drone-plugin drone-archive tar zip gzip archiving compression

drone-archive's Introduction

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

drone-archive's People

Contributors

joseluisq avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.