Last active
February 4, 2021 11:20
-
-
Save cmuench/db83d540b3a35648c58f4ef058a5b332 to your computer and use it in GitHub Desktop.
n98-magerun2.phar in Magento Cloud
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hooks: | |
# We run build hooks before your application has been packaged. | |
build: | | |
set -e \ | |
&& echo "[!] Running composer install ..." \ | |
&& composer -n --no-dev install \ | |
&& curl -O https://files.magerun.net/n98-magerun2.phar \ | |
&& mv n98-magerun2.phar bin/n98-magerun2 \ | |
&& chmod +x bin/n98-magerun2 \ | |
&& echo "alias mr2='~/bin/n98-magerun2'" >> ~/.bash_profile \ | |
&& echo "alias ll='ls -la'" >> ~/.bash_profile \ | |
&& echo "[!] Running Magento build script './vendor/bin/m2-ece-build' ..." \ | |
&& php ./vendor/bin/ece-tools build:generate \ | |
&& echo "Install nodejs modules" \ | |
&& npm install \ | |
&& grunt autoprefixer \ | |
&& php ./vendor/bin/ece-tools build:transfer | |
# We run deploy hook after your application has been deployed and started. | |
deploy: | | |
set -e \ | |
&& echo "[!] Running Magento deploy script './vendor/bin/m2-ece-deploy' ..." \ | |
&& php ./vendor/bin/ece-tools deploy \ | |
&& php bin/magento cache:clean | |
# We run post deploy hook to clean and warm the cache. Available with ECE-Tools 2002.0.10. | |
post_deploy: | | |
php ./vendor/bin/ece-tools post-deploy |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Example of adding n98-magerun2.phar during build process of a Magento Cloud deployment.