Merge pull request #93 from travis-ci/jk_add_restart_to_build_and_job
Add 'restart' to the build and job endpoints
This commit is contained in:
commit
30b17ad863
|
@ -43,6 +43,11 @@ class Travis::Api::App
|
|||
status 204
|
||||
end
|
||||
end
|
||||
|
||||
post '/:id/restart' do
|
||||
Metriks.meter("api.request.restart_build").mark
|
||||
respond_with service(:reset_model, build_id: params[:id])
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -59,6 +59,11 @@ class Travis::Api::App
|
|||
end
|
||||
end
|
||||
|
||||
post '/:id/restart' do
|
||||
Metriks.meter("api.request.restart_job").mark
|
||||
respond_with service(:reset_model, job_id: params[:id])
|
||||
end
|
||||
|
||||
def archive_url(path)
|
||||
"https://s3.amazonaws.com/#{hostname('archive')}#{path}"
|
||||
end
|
||||
|
|
|
@ -3,6 +3,7 @@ require 'travis/api/app'
|
|||
class Travis::Api::App
|
||||
class Endpoint
|
||||
class Requests < Endpoint
|
||||
# DEPRECATED: this will be removed by 1st of December
|
||||
post '/' do
|
||||
Metriks.meter("api.request.restart").mark
|
||||
respond_with service(:reset_model, params)
|
||||
|
|
Loading…
Reference in New Issue
Block a user