Automatically Deploying CI Service Builds

With Liferay PaaS, 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, Azure DevOps). 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 to see its environment variables.

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

  2. Add the following variables to the CI service:

    • Key: LCP_CI_DEPLOY_BRANCH

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

    • Key: LCP_CI_DEPLOY_TARGET

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

  3. 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.

Capabilities

Product

Contact Us

Connect

Powered by Liferay
© 2024 Liferay Inc. All Rights Reserved • Privacy Policy