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.

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}
Create a VCS project through the platform CLI
Create and register the VCS project with its repository and deployment settings.

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

ParameterDescription
{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.
autoupdateEnables or disables periodic checking and automatic deployment of repository updates.
{interval}Auto-update checking frequency. It is required when autoupdate is enabled.
autoResolveConflictEnables automatic conflict resolution for local and repository source differences.
zdtEnables 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}
Update and deploy a VCS project through CLI
Deploy the registered VCS project or manually redeploy it from updated repository sources.

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}
Edit a VCS project through the platform CLI
Update the configuration of an existing VCS project.
ParameterDescription
{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

  1. Create the VCS project with createproject.
  2. Run update to perform the initial deployment.
  3. Use editproject whenever the project settings must change.
  4. Run update again to apply the changed settings or manually redeploy new repository sources.

What’s next?