Service Offerings

Working with code

Code workflows

Each application has its own git repository connected to workflows that deploy to application environments when you push specific branches or tags.

Pushing code for deployment

To commit your project code:

  1. Set up the SSH key for the code repository.

  2. Add the git remote to your deployment artifact repository.

  3. Push your deployable branches to the git remote.

By default, any commits to the dev branch automatically trigger the code deployment to the Dev environment, while the stage branch triggers the Stage environment deployment. You can contact Acquia Support to change the branch/environment mapping.

Important

If your project uses php composer, commit the vendor folder to the repository as well.

Production environment deployment

Deployments to production are not triggered by git pushes. They require SSH access to the production task server and use ach-cli.

Deployment with ach-cli

  1. Log in to Task Server through SSH.

  2. Run the deploy sub-command to deploy a branch (-b) to a specific environment (-e):

    ach-cli deploy -e <environment> -b <branch>
    

    For example, to deploy the “release” branch to the stage environment, run:

    ach-cli deploy -e stage -b release
    

    Important

    If your automated workflows are configured to automatically deploy from a different branch such as stage, then pushing to that branch triggers the deployment and overwrites the release from this branch.

    To request changes to mappings, create a Support ticket.

    To deploy the “release-1.2.0” tag to the production environment, run:

    ach-cli deploy -e production -b release-1.2.0