The Code elements of the Cloud Platform Environments page provide a user interface for deploying code from your repository to your application’s environments. When you commit a branch to your repository, Cloud Platform updates the environment running that code branch.
Make and test changes to administrative configurations, views, and other major application settings only in your non-production environments. Don’t make or test changes in your Production environment. If you make a change that breaks your application in the Production environment, your live application may become unavailable.
To deploy code to an environment:
Make changes to your application in the /master directory, or whatever branch you’ve configured to deploy for the Development environment. Any environment deploying a branch will deploy all commits to that branch immediately.
Never deploy the master branch on your Production environment; code committed to master would then deploy immediately in your live application, before you have had a chance to test it.
http://[site_URL]/update.php in your browser to view scheduled database changes, which are common after core or contributed module updates. Performing these database updates will also clear your application’s caches. If you are uncertain if Drupal’s caches were cleared, Acquia recommends clearing them manually to make sure you are starting from a clean state.You can deploy a different branch or tag in the same environment from either the Environments page, or from the Environments overview page.
To switch the code deployed in an environment from one tag or branch to another:
In the Code element for the environment, click the code switch button.
When you select a new branch or tag to deploy, Cloud Platform retrieves code from your repository and deployed to the appropriate environment on the infrastructure. The deploy task appears in the Activity task list.
You can deploy code on an environment or copy code from one environment to another using the Overview page of the environment.
To switch the code deployed in an environment from one tag or branch to another:
In the Code section, click Switch.
In the Switch code confirmation dialog box, click Switch.
Symlinking your docroot directory to any other directory will cause code deployments to fail.
To move code from one environment to another, such as Dev to Stage or from Stage to Prod, use one of the following processes, depending on your location in the Cloud Platform interface:
From the Environments page
Drag a Code element from one environment to another environment. Cloud Platform creates a new tag for the head version of the branch (the most recently committed code version) and then deploys the tag in the environment you selected. For example, drag your Dev Code element to Stage.
Alternatively, you can add a commit message.
When you drag your Dev code container to the Stage environment, Cloud Platform creates a symbolic link between the Staging environment and the head version (the most recently committed code version) of trunk in your Development environment. When you click Deploy, Cloud Platform creates a tag and updates the infrastructure to that version of your code. The default tag format is yyyy‐mm‐dd.version (for example, tags/2016‐09‐18). From the example, the next tag you create would be 2016‐09‐18.0.
When you have a version ready to deploy to your live production application, drag your code element from the Stage environment to Prod. If the Staging environment is running a tag, that same tag is deployed into Production.
From the Overview page of an environment
To copy code from one environment to another (creating and deploying a new tag) using the Overview page:
In the Deploy code dialog box, select the environment from which you want to copy a tag or branch, and click Continue.
To revert code to an earlier version:
When you deploy a previous branch or tag, Cloud Platform retrieves the code snapshot from your repository and then deploys it on the appropriate environment on the infrastructure.
If this content did not answer your questions, try searching or contacting our support team for further assistance.
The Code elements of the Cloud Platform Environments page provide a user interface for deploying code from your repository to your application’s environments. When you commit a branch to your repository, Cloud Platform updates the environment running that code branch.
Make and test changes to administrative configurations, views, and other major application settings only in your non-production environments. Don’t make or test changes in your Production environment. If you make a change that breaks your application in the Production environment, your live application may become unavailable.
To deploy code to an environment:
Make changes to your application in the /master directory, or whatever branch you’ve configured to deploy for the Development environment. Any environment deploying a branch will deploy all commits to that branch immediately.
Never deploy the master branch on your Production environment; code committed to master would then deploy immediately in your live application, before you have had a chance to test it.
http://[site_URL]/update.php in your browser to view scheduled database changes, which are common after core or contributed module updates. Performing these database updates will also clear your application’s caches. If you are uncertain if Drupal’s caches were cleared, Acquia recommends clearing them manually to make sure you are starting from a clean state.You can deploy a different branch or tag in the same environment from either the Environments page, or from the Environments overview page.
To switch the code deployed in an environment from one tag or branch to another:
In the Code element for the environment, click the code switch button.
When you select a new branch or tag to deploy, Cloud Platform retrieves code from your repository and deployed to the appropriate environment on the infrastructure. The deploy task appears in the Activity task list.
You can deploy code on an environment or copy code from one environment to another using the Overview page of the environment.
To switch the code deployed in an environment from one tag or branch to another:
In the Code section, click Switch.
In the Switch code confirmation dialog box, click Switch.
Symlinking your docroot directory to any other directory will cause code deployments to fail.
To move code from one environment to another, such as Dev to Stage or from Stage to Prod, use one of the following processes, depending on your location in the Cloud Platform interface:
From the Environments page
Drag a Code element from one environment to another environment. Cloud Platform creates a new tag for the head version of the branch (the most recently committed code version) and then deploys the tag in the environment you selected. For example, drag your Dev Code element to Stage.
Alternatively, you can add a commit message.
When you drag your Dev code container to the Stage environment, Cloud Platform creates a symbolic link between the Staging environment and the head version (the most recently committed code version) of trunk in your Development environment. When you click Deploy, Cloud Platform creates a tag and updates the infrastructure to that version of your code. The default tag format is yyyy‐mm‐dd.version (for example, tags/2016‐09‐18). From the example, the next tag you create would be 2016‐09‐18.0.
When you have a version ready to deploy to your live production application, drag your code element from the Stage environment to Prod. If the Staging environment is running a tag, that same tag is deployed into Production.
From the Overview page of an environment
To copy code from one environment to another (creating and deploying a new tag) using the Overview page:
In the Deploy code dialog box, select the environment from which you want to copy a tag or branch, and click Continue.
To revert code to an earlier version:
When you deploy a previous branch or tag, Cloud Platform retrieves the code snapshot from your repository and then deploys it on the appropriate environment on the infrastructure.
If this content did not answer your questions, try searching or contacting our support team for further assistance.