codebots.bots.deploybot.DeployBot ¶
- class codebots.bots.deploybot. DeployBot ( project = None , config_file = None ) [source] ¶
-
Bot to help with the deployment of code on a server. It uses a sshBot in the background.
- Parameters
-
- project str
-
project name. It is used to find the configuration file associated to it.
- config_file json
-
path to a json file containing the required info. You can use the command line to create one or manually configure a json file following this template:
{ "local_repo_path" : "_______", "server_repo_path" : "_______", "server_addres" : "_______", }
Warning
-
You need to have an sshbot settings configured to grant access to the server.
-
You must have :code:git>=2.25 on the server side.
Examples
bot = DeployBot('my_project') bot.deploy_to_server()
- Attributes
-
- local_repo_path str
-
path to the local clone of the repository
- server_repo_path str
-
path to the server bare repository.
- server_addres str
-
complete server address ( username@host ).
- server_complete_path str
-
complete path to the server repository ( username@host:pat/to/server/repository )
- local_repo obj
-
gitpython Repo object pointing to the local repository.
Methods
deploy_to_server
([remote_name, local_name, …])Deploy the changes to the server.