Simple tool for auto-deployment
Project description
Automate adding manually ssh-key, cleaning directory from untracked files, pulling from remote
etc... After pulling
easily configure post steps
. This can be piped into your CI/CD pipeline. Tested on python 3.x
Getting started
# simply clone repo and cd into cloned repo
git clone git@github.com:komron-m/deployment.git && cd deployment
# after cloning copy test_config.json and set all actions and `keys`
cp tests/test_config.json /path/to/project_conf.json
# run script with one argument
python src/main.py /path/to/project_conf.json
Configs
{
"keys": {
"remote": "origin",
"repository_root": "/var/www/awesome-project",
"ssh_key": "/opt/deployment/id_rsa",
"working_branch": "master"
},
"actions": [
{
"description": "Install new dependencies",
"exe": "composer install --ignore-platform-reqs --no-interaction"
},
...
]
}
keys
are mandatory, make sure all permissions are set for files and directories.actions
contain a list of action, wheredescription
is plain message for logging andexe
is command that run right aftergit pull ${remote} ${working_branch}
. All actions run as onepipe
.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
githubdeployment-2.0.0.tar.gz
(4.2 kB
view hashes)
Built Distribution
Close
Hashes for githubdeployment-2.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 694233319f0938e7859e616dba2092d66e70078495909b727cda9ae14b0e54ff |
|
MD5 | e8f207d9076fe6d6156003a6c70279b5 |
|
BLAKE2b-256 | 091d740b903c1232166d4eaa9b2693264acefa43d7e4a244c439a7fde6c3539e |