Last active
November 23, 2016 11:44
-
-
Save manojmj92/25dba2c42b1dc2fcd9518e75792b630e to your computer and use it in GitHub Desktop.
Appsignal deploy markers - AWS Opsworks/Chef
This file contains hidden or 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
revision_command = "git log -n 1 --pretty=format:'%H'" | |
revision = `#{revision_command}` | |
appsignal_token = <your appsignal push api key> | |
branch_name = <your branch> | |
server_name = <your server name> | |
rails_env = <your environment> | |
user = <deployment user> | |
appsignal_url = "https://push.appsignal.com/1/markers?api_key=#{appsignal_token}&name=#{server_name}&environment=#{rails_env}" | |
bash 'report deployment' do | |
cwd release_path | |
code <<-EOH | |
curl -X POST -d '{\"revision\":\"#{revision}\",\"repository\":\"#{branch_name}\",\"user\":\"#{user}\"}' '#{appsignal_url}' | |
EOH | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment