Automatically Deploying CI Service Builds

Automatically Deploying CI Service Builds

With Liferay Cloud, you can use webhooks to automatically trigger Jenkins builds for changes pushed or merged to your project’s Git repository (e.g., GitHub, Bitbucket, GitLab). These builds can then be manually deployed to project environments via the Liferay Cloud Console. Alternatively, you can speed up the deployment process by configuring the CI service to automatically deploy successful builds from a specific branch to a specified environment.

By default, automatic deployment is controlled by the LCP_CI_DEPLOY_BRANCH and LCP_CI_DEPLOY_TARGET variables. Together they determine which branch is used to trigger automatic deployments as well as the environment to which the builds are automatically deployed. Their default values are set to develop and dev respectively.

If desired, you can configure automatic deployment by editing the LCP_CI_DEPLOY_BRANCH and LCP_CI_DEPLOY_TARGET variables via the Liferay Cloud Console:

  1. Navigate to the infra environment for your Liferay Cloud Project.

  2. Go to the CI service’s page, and click on the Environment Variables tab.

    Go to the CI service's page, and click on the Environment Variables tab

  3. Add the following variables to the CI service:


      Value: enter the desired branch name (e.g., useracceptance).


      Value: enter the desired environment name (e.g., uat).

  4. Click on Save Changes. This causes the CI service to restart with the new variables.

Once restarted, any changes pushed or merged to your specified branch are automatically built and deployed to the target environment.