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
Tatuya Kamada
gitlab-ce
Commits
755301a2
Commit
755301a2
authored
Jul 29, 2016
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Also touch the pipeline so we could just hook into update_state
parent
6d82e3f1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
6 deletions
+8
-6
app/models/ci/pipeline.rb
app/models/ci/pipeline.rb
+7
-6
app/services/ci/create_pipeline_service.rb
app/services/ci/create_pipeline_service.rb
+1
-0
No files found.
app/models/ci/pipeline.rb
View file @
755301a2
...
...
@@ -213,12 +213,6 @@ module Ci
]
end
def
execute_hooks
pipeline_data
=
Gitlab
::
DataBuilder
::
PipelineDataBuilder
.
build
(
self
)
project
.
execute_hooks
(
pipeline_data
,
:pipeline_hooks
)
project
.
execute_services
(
pipeline_data
.
dup
,
:pipeline_hooks
)
end
private
def
build_builds_for_stages
(
stages
,
user
,
status
,
trigger_request
)
...
...
@@ -244,6 +238,13 @@ module Ci
self
.
finished_at
=
statuses
.
finished_at
self
.
duration
=
statuses
.
latest
.
duration
save
execute_hooks
end
def
execute_hooks
pipeline_data
=
Gitlab
::
DataBuilder
::
PipelineDataBuilder
.
build
(
self
)
project
.
execute_hooks
(
pipeline_data
,
:pipeline_hooks
)
project
.
execute_services
(
pipeline_data
.
dup
,
:pipeline_hooks
)
end
def
keep_around_commits
...
...
app/services/ci/create_pipeline_service.rb
View file @
755301a2
...
...
@@ -27,6 +27,7 @@ module Ci
end
pipeline
.
save!
pipeline
.
touch
unless
pipeline
.
create_builds
(
current_user
)
pipeline
.
errors
.
add
(
:base
,
'No builds for this pipeline.'
)
...
...
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