atmos / heaven

:walking: Rails app for GitHub Flow

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Asynchronous deployments?

Mezzle opened this issue · comments

My title probably doesn't make sense. So I'll try and explain. As far as I can see, heaven doesn't allow for a workflow similar to the following:-

  • Receive deploy event from Github
  • Trigger deploy process.
  • Wait for response (pingback) to say this has been done/failed
  • Send Deploy Status Event to Github

As far as I can tell at the moment, when the deploy is triggered, resque runs, and is expected to return a pass/fail which it immediately returns to Github.

I'd want to be able to do something like, create an AMI in AWS. This would take a significant amount of time, and I can have SNS send a notification (or similar) when this (long running) process is done. However, as far as I can see, Heaven won't cater for this, and has to sit around polling for the AMI build to be finished.

Am I missing something here? If I'm not - can you give me any pointers for the best way to go about adding this in?

Your understanding is correct. Right now you'd have to poll waiting to see if it was completed. If you want to write something like this you'd need to.

  • Write a provider that fires off the request to AWS or whatever.
  • Fire off a deployment status event to github that leaves it in a pending state.
  • Add a route and controller action to handle some kind of callback url for it.
  • Handle the response and save the deployment status as success/failure.

Unless we can decide on the pingback/callback url being somewhat generic it probably wouldn't be a good fit for adding to the project. Stuff like that would be good for a custom fork or something similar.

Yes, I was thinking of something generic for the callback, so that multiple
asynchronous callbacks are available (I want to do multiple things like
this).

I'll have a play and see what I come up with, hopefully then you can
suggestions for what is useful for the project, and what is useful for a
custom fork.
On 8 Jul 2014 18:11, "Corey Donohoe" notifications@github.com wrote:

Your understanding is correct. Right now you'd have to poll waiting to see
if it was completed. If you want to write something like this you'd need to.

  • Write a provider that fires off the request to AWS or whatever.
  • Fire off a deployment status event to github that leaves it in a
    pending state.
  • Add a route and controller action to handle some kind of callback
    url for it.
  • Handle the response and save the deployment status as
    success/failure.

Unless we can decide on the pingback/callback url being somewhat generic
it probably wouldn't be a good fit for adding to the project. Stuff like
that would be good for a custom fork or something similar.


Reply to this email directly or view it on GitHub
#50 (comment).