Skip to content

Instantly share code, notes, and snippets.

@boblail
Created January 14, 2014 21:21
Show Gist options
  • Save boblail/8425965 to your computer and use it in GitHub Desktop.
Save boblail/8425965 to your computer and use it in GitHub Desktop.
Configuring an EngineYard Deploy Hook to notify Houston
if %w{solo app_master}.member? config.current_role
app = config.current_path[/(?<=\/data\/)([^\/]+)(?=\/)/]
env = ENV["RAILS_ENV"]
sha = File.read("#{config.current_path}/REVISION").chomp
require 'net/http'
require 'uri'
uri = URI("http://status.cphepdev.com/projects/#{app}/deploy/#{env}")
configuration = config.configuration
params = { commit: sha, deployer: configuration["deployer"], config: configuration }
Net::HTTP.post_form uri, params
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment