Code Monkey home page Code Monkey logo

dandelion's Introduction

Dandelion

Gem Version Build Status Dependency Status Code Climate

Incremental Git repository deployment.

Install

Ensure that Ruby >= 1.9.2 is installed, then run:

$ gem install dandelion

Config

Configuration options are specified in a YAML file (by default, the root of your Git repository is searched for a file named dandelion.yml).

Example:

adapter: sftp
host: example.com
username: user
password: pass
path: path/to/deployment

exclude:
    - .gitignore
    - dandelion.yml
    - dir/

additional:
    - config/auth.yml

Required:

  • adapter (alias: scheme, the file transfer adapter)

Optional:

  • path (relative path from root of remote file tree, defaults to the root)
  • local_path (relative path from root of local repository, defaults to repository root)
  • exclude (list of files or directories to exclude from deployment, if local_path is set files are relative to that path)
  • additional (additional list of files from your working directory that will be deployed)
  • revision_file (remote file in which revision SHA is stored, defaults to .revision)

The additional section can either take a list of local file names or key-value formats if you want to upload something to a specific path:

additional:
    - localdir: remotedir
    - file.txt: remotedir/file.txt

The localdir in this example is relative to the repository root (ignoring local_path if you set it).

Each adapter also has additional required and optional configuration parameters (see below).

Adapters

There is support for multiple backend file transfer adapters. The configuration must specify one of these adapters and the set of additional parameters required by the given adapter.

SFTP: adapter: sftp (honors SSH config files)

Required:

  • host
  • username
  • password (not required if you're using an SSH key)

Optional:

  • port (defaults to 22)
  • preserve_permissions (defaults to true)

FTP: adapter: ftp

Required:

  • host
  • username
  • password

Optional:

  • port (defaults to 21)
  • passive (defaults to false)

Amazon S3: adapter: s3

Required:

  • access_key_id
  • secret_access_key
  • bucket_name

Optional:

  • host (defaults to s3.amazonaws.com)
  • preserve_permissions (defaults to true)

Usage

From within your Git repository, run:

$ dandelion deploy

This will deploy the local HEAD revision to the location specified in the config file. Dandelion keeps track of the currently deployed revision so that only files which have been added/changed/deleted need to be transferred.

You can specify the revision you wish to deploy and Dandelion will determine which files need to be transferred:

$ dandelion deploy <revision>

For a more complete summary of usage options, run:

$ dandelion -h
Usage: dandelion [options] <command> [<args>]
    -v, --version                    Display the current version
    -h, --help                       Display this screen
        --repo=[REPO]                Use the given repository
        --config=[CONFIG]            Use the given configuration file

Available commands:
    deploy
    status

Note that when specifying the repository or configuration file, the given paths are relative to the current working directory (not the repository root).

To see the options for a particular command, run dandelion <command> -h:

$ dandelion deploy -h
Usage: dandelion deploy [options] [<revision>]
        --dry-run                    Show what would have been deployed

dandelion's People

Contributors

scttnlsn avatar codewrangler77 avatar ahamid avatar thelonelyghost avatar thomasdarde avatar hypernova2002 avatar nickserv avatar 7twelve avatar davidosomething avatar diegocastro avatar grappler avatar

Watchers

James Cloos avatar Rodrigo Moreira 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.