---
title: "Overriding the AutoDevOps pipeline to use BLT"
date: "2025-01-22T06:55:37+00:00"
summary: "Learn how to override Auto DevOps pipeline to use BLT in your Drupal project with step-by-step instructions and important considerations."
image:
type: "page"
url: "/acquia-cloud-platform/add-ons/code-studio/overriding-autodevops-pipeline-use-blt"
id: "0221755c-a771-4551-923a-917c1438fe97"
---

The [Auto DevOps pipeline](/acquia-cloud-platform/add-ons/code-studio/drupal-auto-devops "Drupal Auto DevOps") replaced BLT commands with [Acquia CLI commands](/acquia-cloud-platform/add-ons/acquia-cli/commands "Acquia CLI Commands") as of March 3, 2025. Acquia recommends that you [remove BLT](https://dev.acquia.com/tutorial/you-dont-need-blt-acquia-cloud) from your project.

To override the [Auto DevOps pipeline](/acquia-cloud-platform/add-ons/code-studio/drupal-auto-devops "Drupal Auto DevOps") to use BLT:

1.  Create a file in your project and name it `.blt-gitlab-ci.yml`.
2.  Add the following content to the file:
    
        include:
          - project: 'acquia/standard-template'
            file: 
              - '/gitlab-ci/Auto-DevOps.acquia.gitlab-ci.yml'
        # Clone the acquia/standard-template to $STANDARD_TEMPLATE_PATH.
        .clone_standard_template:
          script:
            - echo -e "\e[0Ksection_start:`date +%s`:clone_standard_template[collapsed=true]\r\e[0K\033[1;35m[Code Studio AutoDevOps] Cloning AutoDevOps template\033[0m"
            - git clone --depth 50 $STANDARD_TEMPLATE_URL $STANDARD_TEMPLATE_PATH
            - echo -e "\e[0Ksection_end:`date +%s`:clone_standard_template\r\e[0K"
        # The cache strategy for the test jobs.
        .cache_strategy_pull:
          extends: .cache_strategy_push
          cache:
            policy: pull
        # Use custom generated ssh key for BLT.
        .blt_ssh:
          script:
            - eval $(ssh-agent -s)
            - echo 'echo $SSH_PASSPHRASE' > ~/.ssh/tmp && chmod 700 ~/.ssh/tmp
            - echo "$SSH_PRIVATE_KEY" | tr -d '\r' | DISPLAY=None SSH_ASKPASS=~/.ssh/tmp ssh-add -
            - echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
        "Test Drupal":
          stage: "Test Drupal"
          extends: .cache_strategy_pull
          id_tokens:
            VAULT_ID_TOKEN:
              aud: https://gitlab-acquia-vault.cs-gitlab-system.svc.cluster.local:8200
          script:
            - !reference [.clone_standard_template, script]
            - $STANDARD_TEMPLATE_PATH/ci-files/scripts/utility/setup_prereqs.sh
            - $STANDARD_TEMPLATE_PATH/ci-files/scripts/utility/config_ssh.sh $VAULT_ID_TOKEN
            - $STANDARD_TEMPLATE_PATH/ci-files/scripts/utility/composer_install.sh
            - !reference [.blt_ssh, script]
            - cat "$STANDARD_TEMPLATE_PATH"/ci-files/gitlab.settings.php >> "$CI_PROJECT_DIR"/docroot/sites/default/settings.php
            - $CI_PROJECT_DIR/vendor/bin/blt setup --no-interaction
            - $CI_PROJECT_DIR/vendor/bin/blt validate --ansi --verbose --no-interaction
            - $CI_PROJECT_DIR/vendor/bin/blt tests --ansi --verbose --no-interaction
        "Create artifact from branch":
          stage: "Deploy Drupal"
          extends: .cache_strategy_pull
          id_tokens:
            VAULT_ID_TOKEN:
              aud: https://gitlab-acquia-vault.cs-gitlab-system.svc.cluster.local:8200
          script:
            - !reference [.clone_standard_template, script]
            - $STANDARD_TEMPLATE_PATH/ci-files/scripts/utility/setup_prereqs.sh
            - $STANDARD_TEMPLATE_PATH/ci-files/scripts/utility/config_ssh.sh $VAULT_ID_TOKEN
            - !reference [.blt_ssh, script]
            - blt artifact:deploy --commit-msg "Automated commit by Code Studio for Pipeline ${CI_PIPELINE_ID}" --branch "${CI_COMMIT_BRANCH}-codestudio-build" --ignore-dirty --no-interaction --verbose
        "Create artifact from tag":
          stage: "Deploy Drupal"
          extends: .cache_strategy_pull
          id_tokens:
            VAULT_ID_TOKEN:
              aud: https://gitlab-acquia-vault.cs-gitlab-system.svc.cluster.local:8200
          script:
            - !reference [.clone_standard_template, script]
            - $STANDARD_TEMPLATE_PATH/ci-files/scripts/utility/setup_prereqs.sh
            - $STANDARD_TEMPLATE_PATH/ci-files/scripts/utility/config_ssh.sh $VAULT_ID_TOKEN
            - !reference [.blt_ssh, script]
            - blt artifact:deploy --commit-msg "Automated commit by Code Studio for Pipeline ${CI_PIPELINE_ID}" --tag "${CI_COMMIT_TAG}-codestudio-build" --ignore-dirty --no-interaction --verbose
        
    
3.  Click **Settings** > **CI/CD**.
4.  In the General pipelines section, click **Expand**.
5.  In the **CI/CD configuration file** field, enter the path to the custom `.blt-gitlab-ci.yml` file.
6.  Click **Save changes**.

Caution

*   The `.blt-gitlab-ci.yml` file overrides the standard functionality of the [Auto DevOps pipeline](/acquia-cloud-platform/add-ons/code-studio/drupal-auto-devops "Drupal Auto DevOps"). Acquia does not update or maintain the file. Use the file at your own risk.
    
*   Acquia does not support BLT. Therefore, Acquia Support cannot assist in troubleshooting undefined issues caused due to the file.
    

Note

[Drupal Automatic Updates](/acquia-cloud-platform/add-ons/code-studio/automatic-updates "Automatic Updates") does not use BLT even if the `.blt-gitlab-ci.yml` file is present in your project.