CLI Tutorial: VCS Project Deployment
Deployment via VCS is a rather popular and convenient way for project’s integration into the Cloud, as it simplifies operating with app’s sources and allows to easily update its version (either manually or automatically with a certain interval). And the variety of options, available for the VCS deployment management via CLI, gives you the full control on your app.
1. For example, in order to create a new project, the following command should be run:
|
|
Here, the list of parameters can be divided into the following groups:
- main configurations
- {env_name} - name of your environment
- {type} - VCS type, either git or svn; in the first case, the additional {branch} parameter is needed to point to the corresponding projects' version
- {context} - context name for a new project
- {url} - link to the appropriate repository
- additional options (their activation is defined with the {true/false} values)
- autoupdate - enables regular autoupdate of your deployed project; if activated, requires the additional {interval} parameter for setting the frequency of redeployments
- autoResolveConflict - switches on the corresponding same-named option
- zdt - allows to activate ZDT deployment for PHP projects
Note: In case you need to connect to a private repository, the additional authentication parameters [–login {login}] [–password {password}] [–keyId {keyId}] should be added to the main command. Here, you need to obligatory state the {login} option (to specify your VCS account login) and append one of the following settings depending on the desired (password or SSH key) access types:
- {password} - the corresponding VCS account password
- {keyId} - name of the private SSH key you’ve specified while its addition to the dashboard; this allows to establish a secure connection to the repo with the paired public SSH key is attached
2. The next step is running the update command in order to apply these settings and, actually, deploy your project.
|
|
Set the same parameters' values as in the previous step. Subsequently, this command can be also used for manual redeployment of your app based on the updated VCS sources.
3. In case you need to edit project settings (e.g. to switch the version branch), the editproject method should be executed:
|
|
The majority of parameters are already familiar for you, except the following ones that have substituted the previously used {project} property:
- {oldcontext} - name of the project (i.e. context) that should be changed
- {newcontext} - new context for the project (it’s obligatory for specifying; however, could be stated the same as {oldcontext})
The rest of options' values can be changed based on your needs.
What’s next?
For more usage examples refer to the following documents: