BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
785d5c8e
Commit
785d5c8e
authored
Nov 24, 2016
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Create pipeline along with builds in the transation
parent
d5740d3b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
12 deletions
+9
-12
create_pipeline_service.rb
app/services/ci/create_pipeline_service.rb
+9
-3
process_pipeline_service.rb
app/services/ci/process_pipeline_service.rb
+0
-9
No files found.
app/services/ci/create_pipeline_service.rb
View file @
785d5c8e
...
...
@@ -45,9 +45,15 @@ module Ci
return
error
(
'No builds for this pipeline.'
)
end
pipeline
.
save
pipeline
.
process!
pipeline
Ci
::
Pipeline
.
transaction
do
pipeline
.
save
Ci
::
CreatePipelineBuildsService
.
new
(
project
,
current_user
)
.
execute
(
pipeline
)
end
pipeline
.
tap
(
&
:process!
)
end
private
...
...
app/services/ci/process_pipeline_service.rb
View file @
785d5c8e
...
...
@@ -5,11 +5,6 @@ module Ci
def
execute
(
pipeline
)
@pipeline
=
pipeline
# This method will ensure that our pipeline does have all builds for all stages created
if
created_builds
.
empty?
create_builds!
end
new_builds
=
stage_indexes_of_created_builds
.
map
do
|
index
|
process_stage
(
index
)
...
...
@@ -22,10 +17,6 @@ module Ci
private
def
create_builds!
Ci
::
CreatePipelineBuildsService
.
new
(
project
,
current_user
).
execute
(
pipeline
)
end
def
process_stage
(
index
)
current_status
=
status_for_prior_stages
(
index
)
...
...
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