How to get Heroku to build a development branch on an intermediate server?

I have a production application on the master branch that works perfectly. I would like to run a second Heroku application, but 'fed' from the local staging branch. These are the commands that I executed in my unsuccessful attempt to do this:

git checkout -b develop
heroku create --remote staging
git push staging develop

But due to the fact that I exit the "non master" branch, it does not create an application;

remote: Pushed to non-master branch, skipping build.

I read the command for managing multiple environments here; https://devcenter.heroku.com/articles/multiple-environments , but it seems that this is not what I am trying to achieve, but the merge first expands the branch to the master, and then clicks the master on the remote setting, I want to push my branch development to an intermediate application and run it in RAILS_ENV = production mode, iteratively click on this application for "setting / testing" in real time, and then, when I really come down with what I'm going to, I go down to develop the branching code in the master branch and click on the main mast application.

Can someone help me with how to achieve this?

+4
source share
3 answers

heroku doc ​​

git push staging develop:master

+6

Git documentaion

git push  <REMOTENAME> <LOCALBRANCHNAME>:<REMOTEBRANCHNAME>

git push heroku staging:master

push my staging local branch to master remote heroku branch
+2

It's not that close to the most direct command line, but my DevOps pipeline using Codeship makes it a lot easier to commit in different branches.

I have a Codeship that automatically deploys something to the dev branch in one Heroku application, something in the intermediate branch to another, and something that you need to master the active branch.

Not the direct solution you were probably looking for - but what shows the benefits of a good CI setup!

0
source

All Articles