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
Boxiang Sun
gitlab-ce
Commits
0905fe4d
Commit
0905fe4d
authored
Mar 06, 2017
by
Tomasz Maczukin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change artifacts and cache fields to arrays
parent
2956f0a6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
7 deletions
+13
-7
app/models/ci/build.rb
app/models/ci/build.rb
+2
-2
spec/requests/api/runner_spec.rb
spec/requests/api/runner_spec.rb
+11
-5
No files found.
app/models/ci/build.rb
View file @
0905fe4d
...
...
@@ -524,11 +524,11 @@ module Ci
end
def
artifacts
options
[
:artifacts
]
[
options
[
:artifacts
]
]
end
def
cache
options
[
:cache
]
[
options
[
:cache
]
]
end
def
credentials
...
...
spec/requests/api/runner_spec.rb
View file @
0905fe4d
...
...
@@ -308,11 +308,16 @@ describe API::Runner do
{
'key'
=>
'DB_NAME'
,
'value'
=>
'postgres'
,
'public'
=>
true
}]
end
let
(
:expected_artifacts
)
do
{
'name'
=>
'artifacts_file'
,
'untracked'
=>
false
,
'paths'
=>
%w(out/)
,
'when'
=>
'always'
,
'expire_in'
=>
'7d'
}
[{
'name'
=>
'artifacts_file'
,
'untracked'
=>
false
,
'paths'
=>
%w(out/)
,
'when'
=>
'always'
,
'expire_in'
=>
'7d'
}]
end
let
(
:expected_cache
)
do
[{
'key'
=>
'cache_key'
,
'untracked'
=>
false
,
'paths'
=>
[
'vendor/*'
]
}]
end
it
'starts a job'
do
...
...
@@ -329,6 +334,7 @@ describe API::Runner do
expect
(
json_response
[
'services'
]).
to
eq
([{
'name'
=>
'postgres'
}])
expect
(
json_response
[
'steps'
]).
to
eq
(
expected_steps
)
expect
(
json_response
[
'artifacts'
]).
to
eq
(
expected_artifacts
)
expect
(
json_response
[
'cache'
]).
to
eq
(
expected_cache
)
expect
(
json_response
[
'variables'
]).
to
include
(
*
expected_variables
)
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