Support specifying a preview environment value for autodeploy
J
Jade Paoletta
Currently, preview services will inherit the autodeploy setting from the parent service. It would be useful to be able to set a different value in the blueprint for services generated via preview environments.
Log In
i
iain
This is much bigger issue than I had realised. At the moment the accepted way to deploy a service when CI passes is to call the deploy hook for that service as the final step of your CI process. That works fine for services that don’t change (like your production site) because that deploy hook doesn’t change: you can store the deploy hook url somewhere and just call it when you need to. However, pull request previews are created dynamically and the deploy hook is different for each one, so you cannot store that anywhere. So if I make a new branch and render makes a new PR preview for that, how can CI know what the deploy hook is?
AFAIK the only way to do this on CI would be to use the render API to first get all of the services, then filter them to find the service for the current branch being tested, then (using the service id from the services list) call the deploy API endpoint to trigger a deployment with that service id.
If I’m right it feels like there’s no easy way to use pull request previews AND only deploy when CI is passing?