https://github.com/clagiordano/projectdeploy
projectDeploy is a tool for generic project deployment over rsync with specific config for project
https://github.com/clagiordano/projectdeploy
multi-deploy multi-target python simulation sync webhook
Last synced: 10 months ago
JSON representation
projectDeploy is a tool for generic project deployment over rsync with specific config for project
- Host: GitHub
- URL: https://github.com/clagiordano/projectdeploy
- Owner: clagiordano
- License: lgpl-3.0
- Created: 2015-08-25T21:31:21.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2020-01-15T18:09:00.000Z (over 6 years ago)
- Last Synced: 2025-03-22T03:24:55.092Z (about 1 year ago)
- Topics: multi-deploy, multi-target, python, simulation, sync, webhook
- Language: Python
- Homepage:
- Size: 170 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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
```bash
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
```bash
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:
```ini
[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