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
Jérome Perrin
gitlab-ce
Commits
71db3b1c
Commit
71db3b1c
authored
Aug 18, 2016
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make all future skipped builds as processable when retrying a build
parent
62e2989b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
0 deletions
+9
-0
app/models/ci/build.rb
app/models/ci/build.rb
+1
-0
app/models/ci/pipeline.rb
app/models/ci/pipeline.rb
+4
-0
app/models/commit_status.rb
app/models/commit_status.rb
+4
-0
No files found.
app/models/ci/build.rb
View file @
71db3b1c
...
@@ -62,6 +62,7 @@ module Ci
...
@@ -62,6 +62,7 @@ module Ci
status_event:
'enqueue'
status_event:
'enqueue'
)
)
MergeRequests
::
AddTodoWhenBuildFailsService
.
new
(
build
.
project
,
nil
).
close
(
new_build
)
MergeRequests
::
AddTodoWhenBuildFailsService
.
new
(
build
.
project
,
nil
).
close
(
new_build
)
build
.
pipeline
.
mark_as_processable_after_stage
(
build
.
stage_idx
)
new_build
new_build
end
end
end
end
...
...
app/models/ci/pipeline.rb
View file @
71db3b1c
...
@@ -136,6 +136,10 @@ module Ci
...
@@ -136,6 +136,10 @@ module Ci
end
end
end
end
def
mark_as_processable_after_stage
(
stage_idx
)
builds
.
skipped
.
where
(
'stage_idx > ?'
,
stage_idx
).
each
(
&
:process
)
end
def
latest?
def
latest?
return
false
unless
ref
return
false
unless
ref
commit
=
project
.
commit
(
ref
)
commit
=
project
.
commit
(
ref
)
...
...
app/models/commit_status.rb
View file @
71db3b1c
...
@@ -30,6 +30,10 @@ class CommitStatus < ActiveRecord::Base
...
@@ -30,6 +30,10 @@ class CommitStatus < ActiveRecord::Base
transition
[
:created
,
:skipped
]
=>
:pending
transition
[
:created
,
:skipped
]
=>
:pending
end
end
event
:process
do
transition
skipped: :created
end
event
:run
do
event
:run
do
transition
pending: :running
transition
pending: :running
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