Deploy your project automatically when git branch was updated via GitHub or BitBucket webhooks.
Install deployserver from pip.
To start your first autodeploy daemon you need to create deploy.py script file in your project.
To start autodeploy with multiple branches
import deployserver
deployserver.init({
'server_address': 'http://mydomain.com',
'port': 1234,
'branches': [
{
'name': 'master',
'script': '/var/www/myProject/master-deploy.sh'
},
{
'name': 'deploy/test',
'script': '/var/www/myProject/test-deploy.sh',
},
{
'regexp': r'feature/.*',
'script': '/var/www/myProject/feature-deploy.sh'
}
]
})
Then you need to run this script.
If you want to run autodeploy daemon in background, use Screen.
Screen docs: https://www.gnu.org/software/screen/manual/screen.html
Currently support three types of webhooks:
Send HTTP POST request to the callback URL with JSON payload.
{
"branch": "master",
}
For initiation deployserver params dict is required.
Enter a domain name for this server with http protocol.
deployserver will listen this local port.
Bash commands sequence which should be initiated on branch update.
deployserver will listen this local address (default 0.0.0.0).
Which branch push event should initiate deploy function.
Callback uri.
Secret token. Check if it is set.
- Python >= 3.5
- aiohttp
- asyncio
Repository: https://github.com/codex-team/deployserver
Report a bug: https://github.com/codex-team/deployserver/issues
PyPI Package: https://pypi.python.org/pypi/deployserver
CodeX Team: https://ifmo.su