Is there a way to share a single build across multiple services (which are all defined in a single render.yaml file)?
I have a Rails app that has both a web process and a worker process, plus two cron jobs. The build script for the web process is a little different (compiling front-end assets), but the other three are identical. It’d be neat if I could combine those three (or indeed, all four) into a single build. I realise the builds are parallel, so it’s not really going to save much time - it’s more the elegance of such a solution, and the energy it could save as well. Especially if/when I need to add more cron jobs.
If I understand what you are trying to do correctly, one way to achieve this would be to use Deploy Hooks | Render · Cloud Hosting for Developers in a build script that would trigger the other services to build when one of them is built.
Thanks for the response Tyler. I can see how deploy hooks could let me order builds one after the other (though there are no deploy hooks yet for cron jobs) - but how can I specify that Service A’s build is the same as Service B? Or at least inherits from A, to avoid doubling up on build effort?
As we don’t want to build 21 times the same app (1 web app + 20 cron jobs) we ended up running all cron jobs from within our webapp (so we don’t use anymore the render cron job feature)
@cblavier it’s good to hear you’ve found a way around this! Are your cron jobs within your web app process (while it’s also serving web requests) or as stand-alone jobs tied to the service?
within the same process (so we scaled up our worker to a 4gb process so that we don’t hit memory limits).
But it’s far from an ideal situation and I really would like to spin different processes for cron jobs (in my opinion, Heroku scheduler was doing great)