All Projects → codex-team → deployserver

codex-team / deployserver

Licence: MIT license
Deploy your project automatically when git branch was updated.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to deployserver

pm2-githook
receive webhook from github/gitlab and ask pm2 to reload the application for you
Stars: ✭ 39 (+62.5%)
Mutual labels:  module, webhook, bitbucket
micro-dockerhub-hook
Automatic docker deployment with webhooks
Stars: ✭ 32 (+33.33%)
Mutual labels:  webhook, automated-deployment
froggit-go
Froggit-Go is a universal Go library, allowing to perform actions on VCS providers.
Stars: ✭ 19 (-20.83%)
Mutual labels:  webhook, bitbucket
mattermost-bitbucket-bridge
Flask application that serves as a bridge between Bitbucket and Mattermost.
Stars: ✭ 18 (-25%)
Mutual labels:  webhook, bitbucket
Skyhook
Parses webhooks and forwards them in the proper format to Discord.
Stars: ✭ 263 (+995.83%)
Mutual labels:  webhook, bitbucket
Generic Webhook Trigger Plugin
Can receive any HTTP request, extract any values from JSON or XML and trigger a job with those values available as variables. Works with GitHub, GitLab, Bitbucket, Jira and many more.
Stars: ✭ 287 (+1095.83%)
Mutual labels:  webhook, bitbucket
Git Deploy
Php Script for Auto-Pull in server (Using WebHook from GitLab, GitHub and Bitbucket)
Stars: ✭ 495 (+1962.5%)
Mutual labels:  webhook, bitbucket
Hooka
😎 A webhook server with zero coding
Stars: ✭ 180 (+650%)
Mutual labels:  webhook, bitbucket
Git Auto Deploy
Deploy your GitHub, GitLab or Bitbucket projects automatically on Git push events or web hooks
Stars: ✭ 251 (+945.83%)
Mutual labels:  webhook, bitbucket
JB2A DnD5e
Templates of spells from the DnD5e ruleset (SRD and PHB), to use on FoundryVTT
Stars: ✭ 28 (+16.67%)
Mutual labels:  module
atomic-calendar-revive
An advanced calendar card for Home Assistant Lovelace.
Stars: ✭ 218 (+808.33%)
Mutual labels:  module
bitbucket-sync
Mirror of BitBucket Sync project hosted on BitBucket
Stars: ✭ 18 (-25%)
Mutual labels:  bitbucket
icingaweb2-module-businessprocess
Create top-level views of your applications in a graphical editor. Rules express dependencies between existing hosts and services and let you alert on application level. Business processes are displayed in a tree or list overview.
Stars: ✭ 106 (+341.67%)
Mutual labels:  module
diffusion-maps
Fast computation of diffusion maps and geometric harmonics in Python
Stars: ✭ 36 (+50%)
Mutual labels:  module
maze generator
A work-in-progress Javascript maze generator module, compatible with both Deno and Node. 🌽
Stars: ✭ 35 (+45.83%)
Mutual labels:  module
bump
a tiny tool to bump nimble versions 🍻
Stars: ✭ 23 (-4.17%)
Mutual labels:  module
git-the-lines
A Discord bot that prints out the lines referenced in a GitHub, GitLab, or BitBucket snippet link
Stars: ✭ 37 (+54.17%)
Mutual labels:  bitbucket
zscilib
An open-source scientific computing library for embedded systems running Zephyr OS or standalone.
Stars: ✭ 85 (+254.17%)
Mutual labels:  module
CodeforcesApiPy
Implementation of https://codeforces.com API
Stars: ✭ 17 (-29.17%)
Mutual labels:  module
sagdevops-ci-assets
Software AG DevOps library to support assets CI (continuous integration) with webMethods 9.x and 10.0. Work together with https://github.com/SoftwareAG/webmethods-sample-project-layout
Stars: ✭ 23 (-4.17%)
Mutual labels:  automated-deployment

deployserver

Deploy your project automatically when git branch was updated via GitHub or BitBucket webhooks.

Usage

Install deployserver from pip.

$ pip3 install deployserver

To start your first autodeploy daemon you need to create deploy.py script file in your project.

import deployserver


deployserver.init({
    'server_address': 'http://mydomain.com',
    'port': 1234,
    'deploy': 'cd /var/www/myProject;' \
              'git pull;'
})

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.

$ python3 deploy.py

If you want to run autodeploy daemon in background, use Screen.

$ screen -dmS deployserver_myProject python3 deploy.py

Screen docs: https://www.gnu.org/software/screen/manual/screen.html

Webhooks

Currently support three types of webhooks:

Custom Webhooks

Send HTTP POST request to the callback URL with JSON payload.

{
    "branch": "master",
}

Initial params

For initiation deployserver params dict is required.

server_address : string

Enter a domain name for this server with http protocol.

'server_address': 'http://mydomain.com'
'server_address': 'http://8.8.8.8'
'server_address': 'http://0a1b2c3d.ngrok.io'

port : integer

deployserver will listen this local port.

'port': 2345

deploy : string

Bash commands sequence which should be initiated on branch update.

'deploy': 'cd /var/www/myProject;' \
          'git pull;'
'deploy': '/var/www/myProject/deploy.sh'

(optional) host : string

deployserver will listen this local address (default 0.0.0.0).

'host': '127.0.0.1'

(optional) branch : string

Which branch push event should initiate deploy function.

# default
'branch': 'master'
'branch': 'current-sprint'
'branch': 'ver2'

(optional) uri : string

Callback uri.

# default
'uri': '/callback'
'uri': '/'

(optional) secret_token : string

Secret token. Check if it is set.

# default
'secret_token': None
'secret_token': 'a96529a4af7864e7f6e11035d10b7db5'

Requirements

  • Python >= 3.5
  • aiohttp
  • asyncio

Links

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].