Git diff from geroku

I deployed a bonfire to heroics (a sinatra application, using tinder to listen to a bonfire room), and I would like to request it for git diff between what was deployed on another heroku application and what's in our github repo. If I did it locally, I would just

  • clone github repo
  • Add heroku remote server
  • Run a git diff on request
However, in heroku I am limited only by the presence of a tmp directory (on bamboo) or an ephemeral file system (on cedar), as well as the difficulty of managing ssh keys for the user who the application works like.

How can I accomplish this on heroku, preferably to display the results in a tree format?

+4
source share
2 answers

I'm going to assume that you are not happy with the cedar ephemeral file system in that the files are lost every time dyno restarts and the -dyno cross is not visible. Accepting these limitations would obviously be the easiest solution (each dino might have to create its own special git repositories, but that would be so).

The second simplest solution would be to have git log calculated elsewhere. You can write a small web service application (possibly with Sinatra) that takes two repository URLs and returns their diff. And then you can request it from the heroku application. But I suppose this is out of the question, since you are asking for it "to Heroka."

This leads us to the last decision; it involves the creation of everything in memory; the source folder must be created using FakeFS , and the git control must be made from rubies; Scotch tape Chacon grit fork made native calls, not shelling, so it can work (I do not know if the Chacon changes were transferred to the main sand), Thus, all access to the file system will be made from ruby, and everything will be in memory ( you might want to update your memory, by the way)

I personally have not tried any of them, I do not know how well they will perform.

If you need perseverance, perhaps you can combine all of this into / from your database, but that sounds like a lot of trouble.

Hope this helps.

+2
source

From Heroku Support:

jd, Jul-18 03:18 pm (PDT): Hello Ben,

Yes, you can use tmp / on Bamboo or the ephemeral file system on Cedar. Typically, the problem of using git to access external repositories is using a private ssh key. You will need to enable this application with you. You will also need to set the GIT_SSH variable to tell git how to use this key, for example:

GIT_SSH = "ssh -i / app / doc / id_rsa $@ "

Do a little experimenting and you can make it work.

Post-deployment quests can also be useful: http://devcenter.heroku.com/articles/deploy-hooks

Good luck

Cheers, JD

0
source

All Articles