Deploying build artifacts in your Node.js environment

Acquia Cloud Node.js applications have two types of environments: development and production. These environments leverage pipelines for building applications and adding them to your environments.

When you have a build artifact, you can deploy it from one environment to another in a workflow similar to your Acquia Cloud environment.

The Code elements of the Acquia Cloud Environments webpage provide a user interface for deploying build artifacts from your repository to your application's environments. When you commit an artifact to your repository, Acquia Cloud updates the environment running that build artifact. You must then deploy that artifact to make it available for use.

Complete the following steps when you're ready to deploy a build artifact to an environment:

  1. Check out your repository to your local computer.
  2. Use the pipelines feature to create a build artifact — artifacts are not deployed by Acquia Cloud.
  3. Deploy your artifact, either in the same environment or between environments.

Deploying a build artifact in the same environment.

Use one of the following methods to deploy a build artifact in the same environment:

  • Using the Environments page
    To switch the code deployed in an environment from one artifact to another, using the Environments page, complete the following steps:
    1. In the Code element for the environment, click the code switch button.

      Switch build artifacts button

    2. In the Switch artifact dialog box, select an artifact, and then click Continue.
    3. In the Switch artifact confirmation dialog box, click Switch.

    When you select build artifact to deploy, that code is retrieved from your repository and deployed to the appropriate environment on the web servers. The deploy task appears in the Activity task list.

  • From the Environment Overview page
    You can deploy an artifact on an environment or copy an artifact from one environment to another using the Overview page of an environment.
    To switch the code deployed in an environment from one artifact to another, using the Overview page, complete the following steps:
    1. On the Environments page, click the name of the environment to open that environment's Overview page.
    2. On the Overview page for the environment, click Switch.
    3. In the Switch artifact dialog box, select a build artifact, and then click Continue.
    4. In the Switch artifact confirmation dialog box, click Switch.

Moving code from one environment to another

To move code from one environment to another, use one of the following processes, depending on your location in the Acquia Cloud interface:

  • From the Environments page
    1. Drag a Code element from Dev to Prod.
      A Deploy artifact confirmation appears.
    2. Click Deploy.

      Deploying an artifact to production

  • From the Environment Overview page

    To copy code from one environment to another (creating a new tag and deploying it) using the Overview page:

    1. On the Environments page, click the name of the environment to open that environment's Overview page.
    2. On the Overview page for the environment, click Deploy.
    3. In the Deploy artifact dialog box, select the artifact to copy, and then click Continue.
    4. In the Deploy artifact confirmation dialog box, click Deploy.

Reverting code

To revert code to an earlier version, complete the following steps:

  1. In the Code element for the environment, click the code switch button.
  2. In the Switch artifact dialog box, select the tag for the version to which you want to revert, and then click Continue.
  3. In the Switch artifact confirmation dialog box, click Switch.

When you deploy a previous build artifact, Acquia Cloud retrieves the code snapshot from your repository and then deploys it on the appropriate environment on the web servers.

Contact supportStill need assistance? Contact Acquia Support