Link https://devdocs.magento.com/cloud/deploy/scenario-based-deployment.html
Add module to your code, change hook scripts in .magento.app.yaml to merge with new custom scenario from the module
hooks:
# We run build hooks before your application has been packaged.
build: |
set -e
php ./vendor/bin/ece-tools run scenario/build/generate.xml
php ./vendor/bin/ece-tools run scenario/build/transfer.xml
# We run deploy hook after your application has been deployed and started.
deploy: |
php ./vendor/bin/ece-tools run scenario/deploy.xml app/code/Test/Ecetools/scenario/deploy.xml
# 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 run scenario/post-deploy.xml