10

I deploy using "git push heroku master", but I'm using 2 buildpacks and it takes some minutes to build everything. My app is still in QA.

So my question is: Is there a way I can update the remote files without going through all this building process?

Let's say I change

<span class="bla"> 

to

<span class="foo">

I know it won't need to build anything, but I'm forced to build it again.

carlosvini
  • 1,742
  • 19
  • 18
  • "I wish I could test everything locally, but sometimes you just can't" -- why can't you? In most cases, the solution to this issue is to build a proper local testing environment. (The exception is testing things that are specific to controlling the Heroku deployment process.) – Marnen Laibow-Koser Feb 20 '15 at 20:27
  • 1
    @MarnenLaibow-Koser You're right, the best thing is to test everything locally, and only push when you're done. I removed this part from the question. – carlosvini Feb 23 '15 at 17:59
  • I reposted a similar question in ServerFault: https://serverfault.com/questions/966525/node-js-remote-development-environment-similar-heroku-review-apps – Andreas Richter May 09 '19 at 08:55
  • I am facing the same problem. – mrtechmaker May 17 '20 at 12:06
  • @MarnenLaibow-Koser I can't test locally for example because I am coding in AmpScript which does not have a local environment – garek007 Mar 17 '21 at 15:31

1 Answers1

6

It looks like the Heroku build compiler slug is tied directly into Git. When you push, a remote Git hook runs to trigger the rebuild. (It does this "while you wait," which is why you can press Ctrl-C to cancel the build--and the push.)

Interestingly, this fellow was having the opposite problem--he wanted to rebuild without pushing any changes. You can do that, with an empty commit. A new commit arriving will trigger the build hook.

At any rate, you can't disable a Git remote's hooks; that's part of the design of Git. So if you must use Git to publish, the answer to your question is, "no, so have a coffee machine or a webcomic nearby." ;-)

Note that that leaves the possibility of not using Git. I'm totally unfamiliar with it, but you might look at Heroku's Anvil as a way of releasing without using Git. Possibly it's what you're looking for. Let me know if you work something out!

(EDIT: Anvil has been deprecated; apparently Convox is the replacement? Looks expensive.)

George Hilliard
  • 15,402
  • 9
  • 58
  • 96
  • I was expecting this. But i hoped there was a way like running heroku run bash and then running git pull or something... I held this question for some time, i didn't want to ask it, but building with 2 buildpacks takes longer than the normal building i had before. Thx anyway.. – carlosvini Oct 23 '13 at 14:21
  • Interesting suggestion of Anvil. I didn't know that existed. I can't imagine ever needing it in practice, but one never knows. – Marnen Laibow-Koser Feb 20 '15 at 20:29