add 'restart' to the build and job endpoints

This commit is contained in:
Josh Kalderimis 2013-11-06 01:18:54 +01:00
parent 58f1284244
commit 92dc3f55ec
2 changed files with 10 additions and 0 deletions

View File

@ -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

View File

@ -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