VCS Project Deployment
CLI Tutorial: VCS Project Deployment
VCS deployment provides a convenient way to integrate application sources with the platform, update deployed versions manually or automatically, and manage project settings through the command line.
On this page
Create a VCS Project
Run the following command to register a Git or SVN project in the selected environment:
~/jelastic/environment/vcs/createproject \
--envName {env_name} \
--type {type} \
--context {context} \
--url {url} \
[--branch {branch}] \
--autoupdate {true/false} \
[--interval {interval}] \
--autoResolveConflict {true/false} \
--zdt {true/false}
After execution, the CLI response shows brief information about the newly created project.
The command corresponds to the dashboard’s Add Project form. After creation, the same options are visible through the project’s Edit action in the graphical interface. Refresh the dashboard when the project does not appear immediately.
Project Parameters
| Parameter | Description |
|---|---|
{env_name} | Name of the environment where the project should be created. |
{type} | Version-control type: git or svn. |
{context} | Deployment context name assigned to the new project. |
{url} | Repository URL. |
{branch} | Git branch containing the required project version. This parameter is used for Git projects. |
autoupdate | Enables or disables periodic checking and automatic deployment of repository updates. |
{interval} | Auto-update checking frequency. It is required when autoupdate is enabled. |
autoResolveConflict | Enables automatic conflict resolution for local and repository source differences. |
zdt | Enables zero-downtime deployment for supported PHP projects. |
Private Repository Authentication
For a private repository, extend the project-creation or editing command with authentication parameters:
[--login {login}] [--password {password}] [--keyId {keyId}]
{login}— repository-account login and a required value for authenticated access.{password}— repository-account password when password authentication is used.{keyId}— name of the private SSH key previously added in the dashboard.
Authentication choice: Supply the login and then use either the password or SSH-key identifier according to the repository access method.
Deploy or Update the Project
Creating the project saves its configuration. Run the update method to apply those settings and deploy the repository sources:
~/jelastic/environment/vcs/update \
--envName {env_name} \
--context {context}
The same update command can be used later whenever a manual redeployment from the latest VCS sources is required.
Edit Project Settings
Use editproject to change settings such as the tracked branch, context name, repository URL, auto-update options, or zero-downtime deployment:
~/jelastic/environment/vcs/editproject \
--envName {env_name} \
--type {type} \
--oldcontext {oldcontext} \
--newcontext {newcontext} \
--url {url} \
[--branch {branch}] \
--autoupdate {true/false} \
[--interval {interval}] \
--autoResolveConflict {true/false} \
--zdt {true/false}
| Parameter | Description |
|---|---|
{oldcontext} | Current project or deployment-context name that should be changed. |
{newcontext} | New context name. It is required but can be the same as {oldcontext} when the context should not change. |
The
editproject command updates the saved project settings only. Run the update method afterwards to apply the changed configuration to the deployed application.
Recommended Workflow
- Create the VCS project with
createproject. - Run
updateto perform the initial deployment. - Use
editprojectwhenever the project settings must change. - Run
updateagain to apply the changed settings or manually redeploy new repository sources.
