1

After pushing a new code to my Magento Cloud staging environment, the JS stopped working in the backend, I don't run compilation commands out of the Magento Cloud pipelines, but since the deployment, it's not working and the CLI redeploy isn't working to fix it too. Every time I run the command below via Magento CLI, it's very fast, for sure it's not running all the compilation again.

magento-cloud redeploy -e staging

How could I force the compilation of my entire staging?

2
  • Why are you needing to compile Magento once deployed? The only reason I can think of is dynamically creating a Factory instance using the ObjectManager? There should be no need to do this.
    – Craig
    Commented Feb 1, 2022 at 18:25
  • After pushing a new code, the JS stopped working in the backend, I don't run compilation commands out of the Magento Cloud pipelines, but since the deploy the cli redeploy isn't working to fix it Commented Feb 1, 2022 at 18:37

1 Answer 1

1

You can generate a generic file in order to run the entire deployment, I usually create a file called time in the root folder where I just add the current date, then I push it to the Staging environment.

echo $(date) > time

Since Magento Cloud won't know about the purpose of this file, the entire compilation process will be triggered.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.