fluke/devops-service/routes/v2.0/deploy.rb

32 lines
848 B
Ruby
Raw Normal View History

2014-05-08 15:34:26 +04:00
2014-12-22 14:22:04 +03:00
module Devops
module Version2_0
module Routes
module DeployRoutes
2014-05-08 15:34:26 +04:00
2014-12-22 14:22:04 +03:00
def self.registered(app)
2014-05-08 15:34:26 +04:00
2014-12-22 14:22:04 +03:00
# Run chef-client on reserved server
#
# * *Request*
# - method : POST
# - headers :
# - Content-Type: application/json
# - body :
# {
# "names": [], -> array of servers names to run chef-client
# "tags": [], -> array of tags to apply on each server before running chef-client
# "trace": true -> return output in stream
# }
#
# * *Returns* : text stream
2015-02-18 13:50:02 +03:00
app.post_with_headers "/deploy", :headers => [:content_type], &Devops::Version2_0::Handler::Deploy.deploy
2014-05-08 15:34:26 +04:00
2014-12-22 14:22:04 +03:00
puts "Deploy routes initialized"
2014-05-08 15:34:26 +04:00
end
2014-12-22 14:22:04 +03:00
2014-05-08 15:34:26 +04:00
end
end
end
end