The following build variables control actions in the build phase and can inherit and override values from the Global variables. Insert these variables in the
build stage of the
stage: build: BUILD_VARIABLE_NAME: value
For more information about customizing the build and deploy process:
The following variables were removed in v2.2:
Set the level of directory nesting for saving error report files to avoid filling the report directory with tens of thousands of files, which can make it difficult to manage and review the data. This setting defaults to
1. Typically, you do not need to change the default value unless you have problems managing error report files in the
stage: build: ERROR_REPORT_DIR_NESTING_LEVEL: 2
Specify a list of Adobe Commerce quality patches to apply during deployment.
stage: build: QUALITY_PATCHES: [ ]
The following example specifies three patches to apply during deployment.
stage: build: QUALITY_PATCHES: - MC-31387 - MDVA-4567 - MC-456345
See Apply patches.
Specifies which gzip compression level (
9) to use when compressing static content;
0 disables compression.
stage: build: SCD_COMPRESSION_LEVEL: 4
When the time it takes to compress the static assets exceeds the compression timeout limit, it interrupts the deployment process. Set the maximum execution time, in seconds, for the static content compression command.
stage: build: SCD_COMPRESSION_TIMEOUT: 800
true to prevent generating static content for parent themes during the build phase.
SCD_NO_PARENT: false during the build phase so that generating static content for the parent themes does not impact site deployment or cause unnecessary site downtime. See Static content deployment.
stage: build: SCD_NO_PARENT: false
You can configure multiple locales per theme. This customization helps speed up the build process by reducing the number of unnecessary theme files. For example, you can build the magento/backend theme in English and a custom theme in other languages.
The following example builds the
Magento/backend theme with three locales:
stage: build: SCD_MATRIX: "Magento/backend": language: - en_US - fr_FR - af_ZA
The following example builds three themes with three locales:
stage: build: SCD_MATRIX: "Magento/backend": language: - en_US - fr_FR - af_ZA "Magento/blank": language: - en_US - fr_FR - af_ZA "Magento/luma": language: - en_US - fr_FR - af_ZA
Or, you can choose to not deploy a theme:
stage: build: SCD_MATRIX: "Magento/backend": [ ]
Allows you to increase the maximum expected execution time for static content deployment.
By default, Adobe Commerce on cloud infrastructure sets the maximum expected execution to 900 seconds, but in some scenarios you might need more time to complete the static content deployment for a Cloud project.
stage: build: SCD_MAX_EXECUTION_TIME: 3600
If you have issues with static content files in your application after deployment, such as missing custom theme files, increase the maximum expected execution time to 900 seconds or higher.
Use these options only if you have more than one locale:
standard—deploys all static view files for all packages.
quick—(default) minimizes deployment time.
compact—conserves disk space on the server. In Adobe Commerce version 2.2.4 and earlier, this setting overrides the value for
scd_threadswith a value of
stage: build: SCD_STRATEGY: "compact"
Sets the number of threads for static content deployment. The default value is set based on the detected CPU thread count and does not exceed a value of 4. Increasing the number of threads speeds up static content deployment; decreasing the number of threads slows it down. You can set the thread value, for example:
stage: build: SCD_THREADS: 2
To further reduce deployment time, use Configuration Management with the
scd-dump command to move static deployment into the build phase.
true to run Baler after performing static content deployment.
stage: build: SCD_USE_BALER: true
Because Baler is in alpha release, it is not advisable to use it in Production environments.
true to skip the
composer dump-autoload command during a Cloud Docker installation. This variable is only relevant for Cloud Docker containers with writable file systems. In such cases, skipping the command prevents errors from other commands trying to access code from the deleted
When Adobe Commerce runs
composer dump-autoload, it creates autoload files with links to generated classes in the
generated folder, which is not a problem in production environments with read-only files systems. However, for Cloud Docker installations with writable file systems (created only for testing and development using
./vendor/bin/ece-docker build:compose --with-test), you can run the
bin/magento -n setup:upgrade command without the
--keep-generated option, which deletes the
generated directory. If the directory is deleted, the
composer dump-autoload command fails because the autoload contains links to files in the deleted directory.
stage: build: SKIP_COMPOSER_DUMP_AUTOLOAD: true
true to skip static content deployment during the build phase.
If you already deploy static content during the build phase with Configuration Management, you can skip static content deployment for a quick build test.
On the build phase, set
SKIP_SCD: false so that the static content build occurs during the build phase where the process does not impact site deployment or cause unnecessary site downtime. See Static content deployment.
stage: build: SKIP_SCD: false
Enable or disable the Symfony debug verbosity level for
bin/magento CLI commands performed during the deployment phase.
To use VERBOSE_COMMANDS to control the detail in command output for both successful and failed
bin/magento CLI commands, you must set MIN_LOGGING_LEVEL
Choose the level of detail provided in the logs:
-v= normal output
-vv= more verbose output
-vvv= verbose output ideal for debug
stage: build: VERBOSE_COMMANDS: "-vv"