Legacy Knowledge Base
Published Jul. 2, 2025

Building and Deploying using the Liferay Cloud CLI

Written By

Alex Chau

How To articles are not official guidelines or officially supporteddocumentation. They are community-contributed content and may not alwaysreflect the latest updates to Liferay DXP. We welcome your feedback toimprove How to articles!

While we make every effort to ensure this Knowledge Base is accurate, itmay not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with anyfeedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack"publication program, made available for informational purposes. Articlesin this program were published without a requirement for independentediting or verification and are provided "as is" withoutguarantee.

Before using any information from this article, independently verify itssuitability for your situation and project.
Note: please note that Liferay has renamed its Liferay Experience Could offerings to Liferay SaaS (formerly LXC) and Liferay PaaS (formerly LXC-SM).

NOTE: This article is an INTERNAL article and is not visible to customers, currently. Please only link this article in internal comments, but not public comments.

Issue

  • Building and Deploying using the Liferay Cloud CLI

Environment

  • Liferay SaaS stack v3

Resolution

The CI service (Jenkins) also triggers when lcp deploy is invoked via the command line. If we have a DXPC code repository checked out locally, we can build the environment using Gradle tasks and deploying via use of lcp commands.

  1. At the root level of the repository, run blade gw distLiferayCloud - this prepares the LCP.json for deployment. It creates a build/ directory containing the LCP.json files which are used to deploy the DXPC services.
  2. Once built, navigate to /build/lcp/ and run lcp deploy to deploy all services of the specified environment. Alternatively, we can also deploy a single service, by going into a service folder such as /build/lcp/liferay and running lcp deploy at the same level of the service's LCP.json file.
  3. Running lcp deploy will prompt the CLI to ask which environment to deploy to. Selecting a number will begin deployment of the services to the environment.
  4. The deployment can take some time and even fail. Follow the deployments in the Logs page of the Liferay Cloud console to track the process. For verbose logs, use the drop-down and select a specific service.

NOTE: In the deployment logs, the ci service may say Deployment skipped. This is due to the ci service LCP.json file indicating deployment ONLY to the ci environment. So if we deploy to any environment outside of ci such as dev or uat - this results in a skipped deployment.

Did this article resolve your issue ?

Legacy Knowledge Base