Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kazuhiko Shiozaki
gitlab-ce
Commits
6ca99bd8
Commit
6ca99bd8
authored
Feb 02, 2016
by
Grzegorz Bizon
Committed by
Grzegorz Bizon
Feb 19, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
And CI API endpoint where user can erase a build
parent
c850ceec
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
2 deletions
+21
-2
app/views/projects/builds/show.html.haml
app/views/projects/builds/show.html.haml
+2
-1
features/steps/project/builds/summary.rb
features/steps/project/builds/summary.rb
+3
-1
lib/ci/api/builds.rb
lib/ci/api/builds.rb
+16
-0
No files found.
app/views/projects/builds/show.html.haml
View file @
6ca99bd8
...
...
@@ -83,7 +83,8 @@
=
raw
@build
.
trace_html
-
else
.erased.alert.alert-warning
Build has been erased by
#{
@build
.
erased_by
.
username
}
#{
time_ago_with_tooltip
(
@build
.
created_at
)
}
-
erased_by
=
"by
#{
@build
.
erased_by
.
username
}
"
if
@build
.
erased_by
Build has been erased
#{
erased_by
}
#{
time_ago_with_tooltip
(
@build
.
created_at
)
}
%div
#down-build-trace
...
...
features/steps/project/builds/summary.rb
View file @
6ca99bd8
...
...
@@ -26,6 +26,8 @@ class Spinach::Features::ProjectBuildsSummary < Spinach::FeatureSteps
end
step
'recent build summary contains information saying that build has been erased'
do
expect
(
page
).
to
have_css
(
'.erased'
)
page
.
within
(
'.erased'
)
do
expect
(
page
).
to
have_content
'Build has been erased'
end
end
end
lib/ci/api/builds.rb
View file @
6ca99bd8
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment