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.
- At the root level of the repository, run
blade gw distLiferayCloud
- this prepares theLCP.json
for deployment. It creates abuild/
directory containing theLCP.json
files which are used to deploy the DXPC services. - Once built, navigate to
/build/lcp/
and runlcp 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 runninglcp deploy
at the same level of the service'sLCP.json
file. - 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. - 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.