-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MCLOUD-7072: Add CLI command for generating .magento.env.yaml #8040
MCLOUD-7072: Add CLI command for generating .magento.env.yaml #8040
Conversation
Co-authored-by: Barny Shergold <barny.shergold@vaimo.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything is basically fine but please remove the full stops from -
config:dump [dump] Dump configuration for static content deployment.
cron:unlock Unlock cron jobs that stuck in "running" state.
dev:git:update-composer Updates composer for deployment from git.
Appreciate that these are not yours but it would mean the whole section would be consistent.
@BarnyShergold Done, Thank you! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome :)
|
||
Both commands accept one argument - configured in JSON format. | ||
|
||
For example, the next command : | ||
|
||
```bash | ||
php vendor/bin/ece-tools cloud:config:create '{"stage":{"build":{"SCD_THREADS":5}, "deploy":{"CLEAN_STATIC_FILES":false}}}' | ||
``` | ||
|
||
will create a new configuration file `.magento.env.yaml` | ||
|
||
```yaml | ||
stage: | ||
build: | ||
SCD_THREADS: 5 | ||
deploy: | ||
CLEAN_STATIC_FILES: false | ||
``` | ||
|
||
If after that you run `cloud:config:update` command : | ||
|
||
```bash | ||
php vendor/bin/ece-tools cloud:config:update '{"stage":{"build":{"SCD_THREADS":3, "SCD_COMPRESSION_TIMEOUT":1000}}}' | ||
``` | ||
|
||
The configuration file will contain updated values : | ||
|
||
```yaml | ||
stage: | ||
build: | ||
SCD_THREADS: 3 | ||
SCD_COMPRESSION_TIMEOUT: 1000 | ||
deploy: | ||
CLEAN_STATIC_FILES: false | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Providing the following suggestion inline in this code comment because the Suggestion feature doesn't work properly when the suggestion includes closing code block (``` )
Consider replacing lines 80 - 113 with the following text:
Both commands require a single argument, a JSON-formatted array that specifies a value for at least one build, deploy, or post-deploy variable. For example, the following command sets values for the SCD_THREADS
and CLEAN_STATIC_FILES
variables.
php vendor/bin/ece-tools cloud:config:create '{"stage":{"build":{"SCD_THREADS":5}, "deploy":{"CLEAN_STATIC_FILES":false}}}'
This command creates a new .magento.env.yaml
file with the following settings:
stage:
build:
SCD_THREADS: 5
deploy:
CLEAN_STATIC_FILES: false
You can use the cloud:config:update
command to update the new file. For example, the following command changes the SCD_THREADS
value and adds the SCD_COMPRESSION_TIMEOUT
configuration:
php vendor/bin/ece-tools cloud:config:update '{"stage":{"build":{"SCD_THREADS":3, "SCD_COMPRESSION_TIMEOUT":1000}}}'
The updated file contains the following configuration:
stage:
build:
SCD_THREADS: 3
SCD_COMPRESSION_TIMEOUT: 1000
deploy:
CLEAN_STATIC_FILES: false
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
Co-authored-by: Margaret Eker <meker@adobe.com>
Hi @oshmyheliuk, thank you for your contribution! |
* MCLOUD-6939: Errors occur running magento commands in composer cloud docker installation (#8007) * Added variable to skip composer dump-autoload command processing when deploying a Magento Cloud project to a Cloud Docker environment. * MCLOUD-7072: Add CLI command for generating .magento.env.yaml (#8040) * MCLOUD-7072: Add CLI commands for creating and updating .magento.env.yaml * Apply suggestions from code review Co-authored-by: Barny Shergold <barny.shergold@vaimo.com> Co-authored-by: Margaret Eker <meker@adobe.com> * MCLOUD-6805: ECE-Tools release notes WIP: updating variables * MCLOUD-6805: ECE-Tools release notes First draft * MCLOUD-6805: ECE-Tools release notes Fixed double slash on link * added links to two hot fixes * Update services-mysql.md (#8144) Co-authored-by: Margaret Eker <meker@adobe.com> * Update Magento Cloud Docker instructions for adding custom PHP extensions (#8145) * [Doc] Adding new PHP extensions #155 (#7929) * Clean up instructions for adding PHP extensions - Move extension configuration attribute descriptions and examples to a separate section * Fixed markdown syntax * Fix link definitions * Fix link syntax * Apply suggestions from code review Co-authored-by: Yevhen Miroshnychenko <miroshny@adobe.com> Co-authored-by: Barny Shergold <barny.shergold@vaimo.com> Co-authored-by: hguthrie <hguthrie@users.noreply.github.com> * MCLOUD-6805: ECE-Tools release notes Updated entry for MCLOUD-7098 * MCLOUD-6805: ECE-Tools release notes Fixed merge conflicts * Added docs for SKIP_COMPOSER_DUMP_AUTOLOAD * Apply suggestions from code review Co-authored-by: Margaret Eker <meker@adobe.com> * MCLOUD-6805: ECE-Tools release notes Added release notes entry for #7191 * Update error-codes information with current info (#8152) * Update error-codes information with current info - Replaced file with error-code.md file generated from the ece-tools package * Fixed error messages * Add source file for generating the error code ref Co-authored-by: Barny Shergold <barny.shergold@vaimo.com> * Fixed comment syntax on internal note * MCLOUD-6805: ECE-Tools release notes Added release not for MCLOUD-7193 * MCLOUD-6805: ECE-Tools release notes Fixed silly empty bullet * MCLOUD-6805: ECE-Tools release notes Per review, updated additional ece-tools docs changes that are unassociated with the release notes. * MCLOUD-6805: ECE-Tools release notes Per review, removed extra space from yaml code block. * MCLOUD-6805: ECE-Tools release notes Per review, tweaking the wording for writeable Cloud Docker environments. * MCLOUD-6805: ECE-Tools release notes Per review, forgot to clarify the pronoun that. * MCLOUD-6805: ECE-Tools release notes Per review, removed extra space, missed it first time around. * MCLOUD-6805: ECE-Tools release notes Ordered 'new' release note before fixed * MCLOUD-6805: ECE-Tools release notes Added links to documentation. * MCLOUD-6805: ECE-Tools release notes Added links to documentation. * Apply suggestions from code review Co-authored-by: Margaret Eker <meker@adobe.com> Co-authored-by: Oleksandr Shmyheliuk <oshmyheliuk@magento.com> Co-authored-by: maeker12 <{ID}+{username}@users.noreply.github.com> Co-authored-by: jfrontain <frontain@adobe.com> Co-authored-by: Andrii Shevtsov <ashevtsov@magento.com> Co-authored-by: Margaret Eker <meker@adobe.com> Co-authored-by: Yevhen Miroshnychenko <miroshny@adobe.com> Co-authored-by: Barny Shergold <barny.shergold@vaimo.com> Co-authored-by: hguthrie <hguthrie@users.noreply.github.com>
* ECE-Tools 2002.1.3 docs and release notes (#8161) * MCLOUD-6939: Errors occur running magento commands in composer cloud docker installation (#8007) * Added variable to skip composer dump-autoload command processing when deploying a Magento Cloud project to a Cloud Docker environment. * MCLOUD-7072: Add CLI command for generating .magento.env.yaml (#8040) * MCLOUD-7072: Add CLI commands for creating and updating .magento.env.yaml * Apply suggestions from code review Co-authored-by: Barny Shergold <barny.shergold@vaimo.com> Co-authored-by: Margaret Eker <meker@adobe.com> * MCLOUD-6805: ECE-Tools release notes WIP: updating variables * MCLOUD-6805: ECE-Tools release notes First draft * MCLOUD-6805: ECE-Tools release notes Fixed double slash on link * added links to two hot fixes * Update services-mysql.md (#8051 * Update Magento Cloud Docker instructions for adding custom PHP extensions (#8145) * [Doc] Adding new PHP extensions #155 (#7929) * Clean up instructions for adding PHP extensions - Move extension configuration attribute descriptions and examples to a separate section * Fixed markdown syntax * Fix link definitions * Fix link syntax * Apply suggestions from code review Co-authored-by: Yevhen Miroshnychenko <miroshny@adobe.com> Co-authored-by: Barny Shergold <barny.shergold@vaimo.com> Co-authored-by: hguthrie <hguthrie@users.noreply.github.com> * MCLOUD-6805: ECE-Tools release notes Updated entry for MCLOUD-7098 * MCLOUD-6805: ECE-Tools release notes Fixed merge conflicts * Added docs for SKIP_COMPOSER_DUMP_AUTOLOAD * Apply suggestions from code review Co-authored-by: Margaret Eker <meker@adobe.com> * MCLOUD-6805: ECE-Tools release notes Added release notes entry for #7191 * Update error-codes information with current info (#8152) * Update error-codes information with current info - Replaced file with error-code.md file generated from the ece-tools package * Fixed error messages * Add source file for generating the error code ref Co-authored-by: Barny Shergold <barny.shergold@vaimo.com> * Fixed comment syntax on internal note * MCLOUD-6805: ECE-Tools release notes Added release not for MCLOUD-7193 * MCLOUD-6805: ECE-Tools release notes Fixed silly empty bullet * MCLOUD-6805: ECE-Tools release notes Per review, updated additional ece-tools docs changes that are unassociated with the release notes. * MCLOUD-6805: ECE-Tools release notes Per review, removed extra space from yaml code block. * MCLOUD-6805: ECE-Tools release notes Per review, tweaking the wording for writeable Cloud Docker environments. * MCLOUD-6805: ECE-Tools release notes Per review, forgot to clarify the pronoun that. * MCLOUD-6805: ECE-Tools release notes Per review, removed extra space, missed it first time around. * MCLOUD-6805: ECE-Tools release notes Ordered 'new' release note before fixed * MCLOUD-6805: ECE-Tools release notes Added links to documentation. * MCLOUD-6805: ECE-Tools release notes Added links to documentation. * Apply suggestions from code review * Cloud Docker 1.2.0 Release (#8199) * MCLOUD-6430: Xdebug not working on Magento Cloud Docker 1.1 (#7810) * Update src/cloud/docker/docker-development-debug.md * MCLOUD-6898: Add option to customize port for MailHog (#7860) * MCLOUD-6898: Add option to customize port for MailHog * MCLOUD-6660: Add option to disable MailHog * Update src/cloud/docker/docker-config.md * MCLOUD-2789: [Cloud Docker] Add custom ES plugins (#7898) * MCLOUD-2789: [Cloud Docker] Add support for adding custom ES plugins from services.yaml file to the docker-compose.yml file. * MCLOUD-6394: Help with running MFTF test generation commands (#7995) * MCLOUD-6394: Help with running MFTF test generation commands * Added `--with-test` option to `build:compose` option list * Update src/cloud/docker/docker-containers.md - Added test container * Update src/cloud/docker/docker-containers-service.md Added `--with-test` option to `build:compose` option list * Update Docker command help (#8197) * Updated Docker Quick reference - Addedd new options to the magento-docker CLI - Added listing that shows all available options for ece-docker build:compose command - Added intro to Docker Compose section * Updates for Cloud Docker 1.2.0 release (#8198) * MCLOUD-7809 Added instructions for building custom docker-compose.yaml file * Improved instructions for using the init-docker.sh installation script * Updates based on review feedback * Updated Launch developer mode instructions to add step to apply patches before deploying to a Magento Cloud Docker environment Co-authored-by: Oleksandr Shmyheliuk <oshmyheliuk@magento.com> Co-authored-by: Andrii Shevtsov <ashevtsov@magento.com> Co-authored-by: Margaret Eker <meker@adobe.com> Co-authored-by: Yevhen Miroshnychenko <miroshny@adobe.com> Co-authored-by: Barny Shergold <barny.shergold@vaimo.com> Co-authored-by: hguthrie <hguthrie@users.noreply.github.com> Co-authored-by: Jeff Matthews <matthews.jeffery@gmail.com> Co-authored-by: Bohdan Korablov <korablov@adobe.com>
Purpose of this pull request
This pull request (PR) will add information about new
ece-tools
commands.Affected DevDocs pages
whatsnew
Added documentation for the following ece-tools CLI commands to create and update the
.magento.env.yaml
file with a specified configuration that can include one or more build, deploy, and post-deploy variables:cloud:config:create
andcloud:config:update
. See Create configuration file from CLI.