Note
Acquia will end support for BLT on December 31, 2024. For more information on how to replace your BLT implementation with updated functionality, see You don’t need BLT on Acquia Cloud.
After your new project works locally, review the BLT documentation by role to learn how to perform common project tasks and integrate with third-party tools.
Here are tasks that are typically performed at this stage:
Initialize continuous integration (CI).
If you use Code Studio, BLT requires no additional configuration or initialization unless you plan to build a custom build process.
You can initialize Acquia Pipelines as follows:
blt recipes:ci:pipelines:init
Push to your upstream repository using the following Git commands:
git add -A git commit -m 'My new project is great.' git remote add origin [something] git push origin
Ensure that you have entered a value for
git.remotes
in theblt/blt.yml
file:git: remotes: - [email protected]:bolt8.git
Create and deploy an artifact.
blt artifact:deploy
BLT includes additional commonly used commands, as follows:
Command | Description |
---|---|
| List targets. |
| Validate code using commands that include |
| Run phpunit tests. |
| SSH into a virtual machine and run Behat tests. |
| Diagnose issues with BLT. |
| Download and require a new project. |
| Build a deployment artifact. |
| Build an artifact and deploy it to |
| Update BLT. |
Adding settings to settings.php
A common practice in Drupal is to add settings to the settings.php
file to
control things like cache backends, set site variables, or other tasks which
do need a specific module. BLT provides two mechanisms to add settings
to your settings.php
file:
Settings files can be added to the
docroot/sites
directory for inclusion in all websites in the codebase.Settings can be added using an
includes.settings.php
in thesettings
directory of an individual website (such asdocroot/sites/{site-name}/settings/includes.settings.php
).
Both mechanisms allow settings to be overridden by local.settings.php
, to
support local development.
Important
When using BLT, do not add settings directly to settings.php
.
This is also the case with Site Factory, which will ignore settings directly
added to settings.php
.
The first level of BLT’s settings management is the
blt.settings.php
file. When websites are created, BLT adds a
require line to the standard settings.php
file, which includes the
blt.settings.php
file from BLT’s location in the vendor directory.
This file then controls the inclusion of other settings files in a hierarchy.
The full hierarchy of settings files used by BLT appears similar to
the following:
sites/{site-name}/settings.php
|
---- blt.settings.php
|
---- sites/settings/*.settings.php
|
---- sites/{site-name}/settings/includes.settings.php
| |
| ---- foo.settings.php
| ---- bar.settings.php
| ---- ....
|
---- sites/{site-name}/settings/local.settings.php
Important
Do not edit the blt.settings.php
file in the vendor directory. If you
do, the next time composer update
or install
runs, your changes
may be lost. Instead, use one of the following mechanisms:
Global settings for the codebase
To allow settings to be made once and applied to all sites in a codebase, BLT globs the
docroot/sites/settings
directory to find all files matching a*.settings.php
format, and then adds them using PHPrequire
statements.As not all projects will need additional global settings, BLT initially deploys a
default.global.settings.php
file into thedocroot/sites/settings
directory. To make use of this file, rename the file toglobal.settings.php
, and then add settings or required files as needed.Per website
On a per-website basis, BLT uses an
includes.settings.php
file in thesettings
directory of each individual website. Any settings made in that file, or other files required into it, will be added to the settings for that particular website only.As not all projects require additional includes, BLT initially deploys a
default.includes.settings.php
file into the website’sdocroot/sites/{site_name}/settings
directory. To make use of this file, rename it toincludes.settings.php
, and then add the path to the file or files to be added.