diff options
author | Grzegorz Bizon <grzegorz.bizon@ntsn.pl> | 2016-02-02 15:39:47 +0100 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-02-19 17:24:59 +0100 |
commit | 6ca99bd899322ff4ada84f119907eb0210485482 (patch) | |
tree | dc52dc84c7f0ef11ef657f9c7cf326785a0ed800 /lib/ci | |
parent | c850ceec5d595d3808fa566db3d2e88faa3797cf (diff) | |
download | gitlab-ce-6ca99bd899322ff4ada84f119907eb0210485482.tar.gz |
And CI API endpoint where user can erase a build
Diffstat (limited to 'lib/ci')
-rw-r--r-- | lib/ci/api/builds.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/ci/api/builds.rb b/lib/ci/api/builds.rb index 416b0b5f0b4..23e909df366 100644 --- a/lib/ci/api/builds.rb +++ b/lib/ci/api/builds.rb @@ -159,6 +159,22 @@ module Ci build.remove_artifacts_file! build.remove_artifacts_metadata! end + + # Erase build (remove artifacts and build trace) + # + # Parameters: + # id (required) - The ID of a build + # token (required) - The build authorization token + # Headers: + # BUILD-TOKEN (required) - The build authorization token, the same as token + # Example Request: + # PUT /builds/:id/erase + put ':id/erase' do + build = Ci::Build.find_by_id(params[:id]) + not_found! unless build + authenticate_build_token!(build) + build.erase! + end end end end |