Build variables
The following build variables control actions in the build phase and can inherit and override values from the Global stage. Insert these variables in the build
stage of the .magento.env.yaml
file:
stage:
build:
BUILD_VARIABLE_NAME: value
For more information about customizing the build and deploy process:
You can still use the build_options.ini
file, but we recommend using the .magento.env.yaml
file instead because it centralizes the management of build and deploy actions across all of your environments—including Pro Staging and Production—without requiring a support ticket.
The following variables were removed in v2.2:
skip_di_clearing
skip_di_compilation
EXCLUDE_THEMES
- Default— Not set
- Version—Magento 2.1.4 and later
When enabled, this option does not generate static content for the specified theme location(s). This is helpful when static content deployment occurs during the build phase. Use commas to separate multiple theme locations.
For example, the Luma theme is included with all Magento Commerce (Cloud) projects. You may not need to constantly generate static content for this theme, which adds time to your build. To exclude the theme, use the following:
stage:
build:
exclude_themes=magento/luma,magento/my-theme
SCD_COMPRESSION_LEVEL
- Default—
6
- Version—Magento 2.1.4 and later
Specifies which gzip compression level (0
to 9
) to use when compressing static content; 0
disables compression.
SCD_STRATEGY
- Default— Not set
- Version—Magento 2.1 supports the
standard
strategy only
Allows you to customize the deployment strategy for static content. Refer to Deploy static view files for more information.
Use these options only if you have more than one locale:
standard
—deploys all static view files for all packages.quick
—minimizes deployment time. This is the default command option if not specified.compact
—conserves disk space on the server. If you usecompact
, it overrides the value forscd_threads
with a value of1
. This strategy does not work with multi-threads.
SCD_THREADS
- Default:
1
—Starter environments and Pro Integration environments3
—Pro Staging and Production environments
- Version—Magento 2.1.4 and later
Sets the number of threads for static content deployment. Increasing the number of threads speeds up static content deployment; decreasing the number of threads slows it down.
To further decrease deployment time, we recommend using Configuration Management with the scd-dump
command to move static deployment into the build phase.
SKIP_SCD
- Default— Not set
- Version—Magento 2.1.4 and later
Skips static content deployment during the build phase.
If you are already deploying static content during the build phase with Configuration Management, you may want to turn it off for a quick build test.
We do not recommend using this option, because running static content deployment during the deployment phase can greatly increase deployment times and downtime for your live site.
VERBOSE_COMMANDS
- Default—
disabled
- Version—Magento 2.1.4 and later
Enables or disables the Symfony debug verbosity level for your logs. Be aware, if you enable this verbosity, the logs will be deeply detailed.