Skip to main content

Deploy your project automatically when git branch was updated.

Project description

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;'
})

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

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) 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

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

deployserver-0.4.0.tar.gz (4.0 kB view details)

Uploaded Source

Built Distributions

deployserver-0.4.0-py3.5.egg (7.5 kB view details)

Uploaded Egg

deployserver-0.4.0-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file deployserver-0.4.0.tar.gz.

File metadata

  • Download URL: deployserver-0.4.0.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.19.8 CPython/3.6.1

File hashes

Hashes for deployserver-0.4.0.tar.gz
Algorithm Hash digest
SHA256 cb2fecbe4c1283fc012ac853ccb2f9c986634fb6928e23ef7bb9309b61ede230
MD5 e58dac90591c6d6555bf41efc63f0376
BLAKE2b-256 0ed14974479748dc7809aac065e0e31198e765735f9944e2e1071e90a58690d9

See more details on using hashes here.

File details

Details for the file deployserver-0.4.0-py3.5.egg.

File metadata

  • Download URL: deployserver-0.4.0-py3.5.egg
  • Upload date:
  • Size: 7.5 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.9.1 pkginfo/1.4.1 requests/2.18.4 setuptools/38.4.0 requests-toolbelt/0.8.0 tqdm/4.19.5 CPython/3.5.2

File hashes

Hashes for deployserver-0.4.0-py3.5.egg
Algorithm Hash digest
SHA256 c875f512321f101a596ab7b873d6c58bd3fa2b3c55a3221626dd8615e3e7a63c
MD5 8ddac1b8a945e96101747bc8340d8b80
BLAKE2b-256 3fd66643e5534aa330094e9fea274024a04457740e477315e2c212b0b574b8a5

See more details on using hashes here.

File details

Details for the file deployserver-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: deployserver-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.19.8 CPython/3.6.1

File hashes

Hashes for deployserver-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7333fd961681075d2791aaf259ebd18c575584e5d4669319ddbfae3b6d6628b6
MD5 ddd621d253cb68275b6e9a9def8f7f69
BLAKE2b-256 8afe17b1bf342c2db6b55baf8ad64acd8631cb1f10287988c50036b8eef6a298

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page