Autodeploy and preview environment

I just set up a preview environment which seems to be working :slight_smile:

Now, I would like the main application to run with autoDeploy: false whereas I would like the preview apps to run with autoDeploy: true (I don’t want to push a button to get my PR applications to be created/updated but I want to manually trigger production deployment with the trigger URL)

2 Likes

I have another related question: is it possible to filter out some branch/PR that I don’t want to be deployed?

We’re using Dependabot from Github, which creates a lot of PRs every day and we don’t them to automatically provision a new environment.

Christian,

Excellent news!

You’re requirements there make perfect sense, you want to be in control of when your production application deploys but you want the preview environments to auto deploy.

You have to do a bit of tweaking to get it setup as you want at the moment but it’s a shortcoming that we’re very aware of.

For your production service you want to create a new github repo which just contains a render.yaml. In that render.yaml you would explicitly set the repo attribute to the repo of your production repo and then have auto deploys set to false, also defining any other services that it may need.

You would then use new > blueprint and create a new environment which is going to become your production service. which doesn’t auto-deploy.

Your existing environment would become your ‘staging’ environment which you can have auto deploy as you want. Some folks use a team boundary, also as a further way to separate production and staging/dev services.

It’s a little bit hacky but the best we have right now.

As for your second question, I’m double checking but I think that defining a buildfilter (https://render.com/docs/monorepo-support#do-build-filters-and-root-directory-work-with-preview-environments) that ignores whatever file dependabot is changing could be used to skip preview environments to be created.

John B

1 Like

Thanks @John_B !

I remember a former PAAS (name Hero-something, can’t remember :wink:) which had quite a convenient deployment pipeline. Is it planned on render.com?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.