Deploying Changes via the Liferay Cloud Console
This tutorial walks through the process of adding a portal property to the Liferay service, triggering a CI build with a pull request, and deploying the new build to the dev
environment via the Liferay Cloud console.
To get started, you need a code hosting service integrated with your project’s CI service and a local, working copy of your project’s repository.
For an alternative deployment workflow, see Deploying Changes via the CLI Tool_ to learn how to deploy local changes to your project environments using the Liferay Cloud Platform CLI tool.
- Adding a Portal Property to the Liferay Service
- Triggering a Jenkins Build with a Pull Request
- Deploying Your New Build via the Liferay Cloud Console
- Verifying Your Sample Deployment
Adding a Portal Property to the Liferay Service
Begin the deployment life cycle by adding a portal property to the dev
environment’s Liferay service and committing your changes:
-
Ensure your local master branch is up-to-date with the latest version of your project’s repository.
-
Create a new working branch based on your up-to-date master branch.
git checkout -b example-console-deployment-branch
-
Go to
<project>\liferay\configs\dev\portal-env.properties
, and add the following property:web.server.display.node=true
-
Add and commit your changes to the
portal-env.properties
file with the following commands:git add .
git commit -m "Test - Adding Portal Property"
Triggering a Jenkins Build with a Pull Request
Next, trigger a Jenkins build with a pull request to your project’s central Git repository:
-
Push your new branch to the origin of your local repository.
git push -u origin example-console-deployment-branch
-
Navigate to your Git repository, and trigger a Jenkins build with a new pull request to your project’s central repository.
You can track the status of your build and view detailed logs via your project’s Jenkins page:
https://ci-<project-name>-infra.lfr.cloud
Deploying Your New Build via the Liferay Cloud Console
Once your new build is ready, deploy it to your project’s dev
environment via the Liferay Cloud console:
-
Navigate to the Builds page for your project in the Liferay Cloud console. You can access this page from any project environment.
-
Click on the Actions button ( ⋮ ) for the build you want to deploy, and select Deploy Build To…
-
Use the drop-down menu to select the
dev
environment. -
Use the checkboxes to confirm your deployment, and click on Deploy Build.
TipYou can also access the Deploy Build to… page by clicking on the Build ID for the build you want to deploy.
You can view the status of your deployment from the Deployments page, as well as the Logs and Activities pages of the
dev
environment.
Verifying Your Sample Deployment
Once your build has successfully deployed and your dev
environment’s Liferay service is Ready, follow these steps to verify your changes:
-
Navigate to your project’s
dev
environment. -
Go to the Web Server service’s page, and click on its URL to access the
dev
environment’s Liferay instance:https://webserver-<project-name>-dev.lfr.cloud/
. -
Verify the web server node appears at the bottom of the Home Page.