0

I'm using Heroku pipeles to deploy an webapp that has the back-end app writen on Ruby on Rails and the front-end app using VueJS and I'm having trouble promoting the front-end app from one stage to another inside the pipeline because I'm setting up the base URL for my back-end app using and enviroment variable inside my VueJS app.

The problem is that the build process happens when I commit my code to the Heroku repo in one particular stage, and the build process reads the base URL ENV at that moment at sets it up for the VueJS app, but when I promote my app from, let's say, development to staging, the app is not rebuild, so I endup with an app on staging pointing to my developing back-end.

So rather than promoting my front-end app from development to staging, I have to actually add both stage's heroku git repo remote to my local project git repo and push it to both stages so the build process happens separatly in each stage and get's the base URL ENV of that specific stage. It works, but I end up not having to be able to use the promote feature from heroku pipeline.

razenha
  • 7,660
  • 6
  • 37
  • 53
  • As far as I know it isn't really possible. The way I got around it was just to deploy them separately from the command line. I recently started using AWS Amplify to deploy front end apps and in that case I make a new amplify app and track both my dev and main branch it's easy to link to github or whatever and automatically run a build when you push to that branch, with whatever env vars you specify in amplify. – PhilCowan Jan 05 '23 at 01:11

0 Answers0