Coder Social home page Coder Social logo

clagiordano / projectdeploy Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 1.0 174 KB

projectDeploy is a tool for generic project deployment over rsync with specific config for project

License: GNU Lesser General Public License v3.0

Python 100.00%
multi-target webhook sync multi-deploy simulation python

projectdeploy's Introduction

Description

project Deploy is general purpose tool for project deployment over rsync with specific config for project, configurable ignores, list of selectable targets, list of multi target for massively deploy, entry point for pre and post deploy for arbitrary command execution and related exit status. Allow global config file and/or the use of command line switch/args for override configs.

Notes about versions

  • Until version 1.5 projectDeploy is a shell (bash) script
  • From version 2.0 (WIP) the shell (bash) code was migrated to python to improve features

Requirements

  • python >= 2.6

Features

  • general purpose deployment tool
  • specific config for project
  • configurable ignores
  • list of selectable targets
  • support for multi targets deploy
  • entry point for pre and post deploy for arbitrary command execution

Installation

git clone https://github.com/clagiordano/projectDeploy.git

echo 'export PATH=$PATH:/path/to/projectDeploy' >> ~/.bashrc

Update

Easily pull changes from repository with git command

git pull

Configuration

Minimum required configurations

To work properly projectDeploy need this config files into .projectDeploy/projectName folder

  • ~/.projectDeploy/[PROJECT NAME]/targets (destinations list)

Optional configurations files

You can also specificate this optional configuration files if need a default behavior or need to execute commands or script into pre and/or post deploy operation

  • ~/.projectDeploy/projectDeploy.conf (global config file)
  • ~/.projectDeploy/[PROJECT NAME]/presync (pre sync commands)
  • ~/.projectDeploy/[PROJECT NAME]/postsync (post sync commands)
  • ~/.projectDeploy/[PROJECT NAME]/ignores (file to exlude from sync)
  • ~/.projectDeploy/[PROJECT NAME]/multitargets (multi destination list)
  • ~/.projectDeploy/[PROJECT NAME]/webhooks (webhook list)

Target / multitargets file formats

Targets must be defined one for line as:

  • USER@HOST:PATH
  • USER@HOST2:PATH

WebHooks

to configure one or more webhooks simply add into project configuration folder, a file with name webhooks, into this file add one or more sections like:

[sectionname]
baseurl = https://example.com
requesturl = /webhook/entry/point
payloadtemplate = payload string to POST

WebHooks template allowed variables

  • %COLOR% current status color (yellow on start/abort, green on success, red on error)
  • %TITLE% current operation method
  • %PROJECT% selected project
  • %SESSION_USERNAME% user session username (for remote deploy)
  • %SESSION_HOSTNAME% user session hostname (for remote deploy)
  • %SESSION_IPADDRESS% user session ipaddress (for remote deploy)
  • %SOURCEDIR% project source directory
  • %TARGET% selected target

Workflow

Common steps

  • list projects directory
  • select project
  • list targets
  • select targets
  • select single or multi target

Single deploy project

  • call presync
  • simulation deploy
  • deploy
  • call post sync

Multi deploy project

  • call presync
  • simulation deploy to all targets
  • deploy to all targets
  • call post sync

TODO

  • rsync progess during deploy / simulation
  • pass addictional params to pre / post sync script from main script by CLI
  • logging deploy
  • ignore ^.(.*)$ folders

License

projectDeploy is released under the GNU LGPL-3.0 license

Copyright (C) 2016 Claudio Giordano [email protected]

projectdeploy's People

Contributors

clagiordano avatar

Watchers

 avatar  avatar

Forkers

goffreder

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.