Created
January 14, 2014 21:21
-
-
Save boblail/8425965 to your computer and use it in GitHub Desktop.
Configuring an EngineYard Deploy Hook to notify Houston
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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