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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
364072b7
Commit
364072b7
authored
Feb 18, 2016
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Return a builds array in builds create service
parent
90a6783d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
0 deletions
+21
-0
app/services/ci/create_builds_service.rb
app/services/ci/create_builds_service.rb
+1
-0
spec/services/ci/create_builds_service_spec.rb
spec/services/ci/create_builds_service_spec.rb
+20
-0
No files found.
app/services/ci/create_builds_service.rb
View file @
364072b7
...
@@ -34,6 +34,7 @@ module Ci
...
@@ -34,6 +34,7 @@ module Ci
build
=
commit
.
builds
.
create!
(
build_attrs
)
build
=
commit
.
builds
.
create!
(
build_attrs
)
build
.
execute_hooks
build
.
execute_hooks
build
end
end
end
end
end
end
...
...
spec/services/ci/create_builds_service_spec.rb
0 → 100644
View file @
364072b7
require
'spec_helper'
describe
Ci
::
CreateBuildsService
,
services:
true
do
let
(
:commit
)
{
create
(
:ci_commit
)
}
let
(
:user
)
{
create
(
:user
)
}
describe
'#execute'
do
subject
do
described_class
.
new
.
execute
(
commit
,
stage
,
'master'
,
nil
,
user
,
nil
,
status
)
end
context
'stubbed .gitlab-ci.yml'
do
let
(
:stage
)
{
'test'
}
let
(
:status
)
{
'success'
}
it
{
is_expected
.
to
be_an_instance_of
Array
}
it
{
is_expected
.
to
all
(
be_an_instance_of
Ci
::
Build
)
}
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