Information for: DEVELOPERS   PARTNERS

Workflows with the pipelines client

Acquia Cloud pipelines client

After you have installed and configured the pipelines client (which is required only if you want to manage pipelines from the command prompt), complete the following steps to create an application with the command-line client:

  1. Create a build definition file that describes how to build your application and add it to the root of your workspace.

  2. Build your application using the start command.

    Note for GitHub users

    As an alternative, you can use the Acquia Cloud pipelines integration in the user interface, in which case creating a pull request, pushing a tag, or pushing a branch in GitHub triggers a pipelines build.

    When you run the pipelines start command in a Git repository that has an Acquia Cloud repository as a remote, the start command determines the correct application ID. However, if your local Git repository has only GitHub as a remote, the start command cannot determine the correct application ID on its own. You can set the correct application ID for a specific repository using the pipelines set-application-id command.

    To determine the correct application ID, run the pipelines list-applications command, and then find the application ID associated with the application that you want. Then, from the Git repository that you want to configure, run the following command:

    pipelines set-application-id --application-id=[application ID]
  3. Use the status command to verify if the build has completed and whether it was successful. If you use the Acquia Cloud pipelines GitHub integration, you can see job completion and success information on the GitHub pull request. You still need to use the status command for information about commits that are not part of a pull request.

  4. If desired, deploy your build artifact.

The build artifact

After the build is complete, the build artifact is committed to your Acquia Cloud repository in a build branch, which by default is given the name of the branch that you built, with pipelines-build prepended. The path of the build branch in the repository is reported in the output of the start command. The build branch is then available to be deployed into one of your Acquia Cloud environments.

Why is the build artifact created in the repository?

Storing the build artifact in your Acquia Cloud repository provides the following advantages over alternatives such as creating a tarball:

  • You can easily deploy the build artifact to your Acquia Cloud environments, using the Acquia Cloud interface or the Cloud API.
  • You can easily view the build artifact using Git.
  • You can more easily debug your build process, comparing the build artifact against what you may have expected, as well as compare build artifacts over time, using a tool like git diff.
  • You can control how long your build artifacts are retained, since you control the contents of your own repository. You may, for example, have compliance requirements that mandate keeping them for a specified time, or security concerns that require you to be able to delete them promptly.
  • You can easily copy a build artifact to other systems for such purposes as static code analysis or license compliance.

Deploying the build artifact

After you have successfully completed a build, you can deploy the resulting build artifact in any Acquia Cloud environment. You can do this by selecting the build branch for deployment, using either of the following methods:

After you set the deployed branch of an environment to a build branch, each build artifact committed to that branch is deployed immediately, without requiring any intervention. For example, if you build the master branch, and your Acquia Cloud development environment is set to the pipelines-build-master branch, the build artifact is deployed immediately to that development environment when the pipeline job completes successfully.