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
Léo-Paul Géneau
gitlab-ce
Commits
e96401f0
Commit
e96401f0
authored
Jul 15, 2016
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a download prefix so that we could add file prefix in the future
parent
398de9f1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
lib/api/builds.rb
lib/api/builds.rb
+3
-4
spec/requests/api/builds_spec.rb
spec/requests/api/builds_spec.rb
+3
-1
No files found.
lib/api/builds.rb
View file @
e96401f0
...
...
@@ -80,11 +80,10 @@ module API
# ref_name (required) - The ref from repository
# job (required) - The name for the build
# Example Request:
# GET /projects/:id/artifacts/
:ref_name/:build_
name
get
':id/builds/artifacts/:ref_name'
,
# GET /projects/:id/artifacts/
download/:ref_name?job=
name
get
':id/builds/artifacts/
download/
:ref_name'
,
requirements:
{
ref_name:
/.+/
}
do
builds
=
user_project
.
builds_for
(
params
[
:job
],
params
[
:ref_name
])
builds
=
user_project
.
builds_for
(
params
[
:job
],
params
[
:ref_name
])
latest_build
=
builds
.
success
.
latest
.
first
...
...
spec/requests/api/builds_spec.rb
View file @
e96401f0
...
...
@@ -191,7 +191,9 @@ describe API::API, api: true do
include_context
'artifacts from ref and build name'
def
path_from_ref
(
ref
=
pipeline
.
sha
,
job
=
build
.
name
)
api
(
"/projects/
#{
project
.
id
}
/builds/artifacts/
#{
ref
}
?job=
#{
job
}
"
,
user
)
api
(
"/projects/
#{
project
.
id
}
/builds/artifacts/download/
#{
ref
}
?job=
#{
job
}
"
,
user
)
end
context
'401'
do
...
...
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