herokuhubothipchat

How to git push heroku master by using hubot on hipchat?


I installed hubot, heroku and hipchat. I deployed Hubot to Heroku and I tested on hipchat, I typed some command line example: @hubot help, @hubot image me "hubot".... and It worked fine.

But in my project, I need use hipchat to deploy my project to heroku. Example when I type on hipchat is: @hubot deploy app, then my project will be deployed to heroku (instead of tying: "git push heroku master" on Terminal). Please help me, I really thank you so much!


Solution

  • This is a very broad questions. There is no single answer.

    For sure, you need a deployment service that performs the deployment. Hubot should ping the deployment service when you send the deploy command.

    The deployment service should have access to your repository and Heroku account and perform the git push command for the deploy. The deployment service may have a local clone of your project, or download it from some centralized location (E.g. GitHub) and perform a push to Heroku.

    The deployment service can be a server you control, a third party service such as this one, the server where Hubot is running (not ideal).

    Heroku also offers Dropbox sync and is experimenting deploy from GitHub. In this case, the deploy doesn't require a deployment service (or to be more correct, the deployment service is in fact Heroku). Hubot would simply trigger a new synchronization at Heroku, as long as Heroku is connected to either GitHub or Dropbox (depending on where the app is stored).