Issue
-
Is it possible to use multiple branches to keep the codebase separate in the Liferay Cloud?
Environment
- Liferay Cloud
Resolution
- How you manage the branches of your codebase is completely up to you. The only requirement is that the repository is connected to the DXP Cloud environment using the steps defined in our documentation(listed below). This means that it is possible keep your codebase separated by branch, should you need to.
-
One important thing to note however is that using multiple branches in a repository may not always achieve the desired end goal.
For example, since DXP Cloud does not use long-running containers, each deployment will overwrite the previous one(with the exception of the Database and data stored in Volumes). This means that when you deploy from branch 1 then branch 2, unless you have a method of combining/merging the code changes into a single pull request, the environment will only contain the changes from branch 2. Branch 1 has been overwritten.