Open hisham opened 1 year ago
It appears if I move the custom commands to the preBuild backend step, then conditional backend builds work just fine. I think this is a better solution than moving them to the frontend phase, and I think the documentation at https://docs.aws.amazon.com/amplify/latest/userguide/conditional-backends.html should be updated with this option.
This has been identified as a feature request. If this feature is important to you, we strongly encourage you to give a 👍 reaction on the request. This helps us prioritize new features most important to you. Thank you!
Is your feature request related to a problem? Please describe. Per https://docs.aws.amazon.com/amplify/latest/userguide/conditional-backends.html: "If you currently have custom commands specified in the build settings of your backend phase, conditional backend builds won't work. If you want those custom commands to run, you must move them to the frontend phase of your build settings in your app's amplify.yml file. For more information about updating the amplify.yml file, see Build specification YAML syntax."
Describe the solution you'd like It is normal however to have custom scripts, for example, we need to run 'npm ci' before the backend build so that custom graphql transformers, needed by our amplify backend, are installed.
Additional context I don't understand why you don't support custom commands. More explanation, and an update on whether you plan to support conditional backend builds with custom commands would be helpful.