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
1ae797c2
Commit
1ae797c2
authored
Apr 12, 2016
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix create_next_builds method
parent
ac50f9dd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
22 deletions
+3
-22
app/models/ci/commit.rb
app/models/ci/commit.rb
+3
-3
lib/ci/status.rb
lib/ci/status.rb
+0
-19
No files found.
app/models/ci/commit.rb
View file @
1ae797c2
...
@@ -116,12 +116,12 @@ module Ci
...
@@ -116,12 +116,12 @@ module Ci
next_stages
.
delete
(
build
.
stage
)
next_stages
.
delete
(
build
.
stage
)
# get status for all prior builds
# get status for all prior builds
prior_builds
=
latest_builds
.
reject
{
|
other_build
|
next_stages
.
include?
(
other_build
.
stage
)
}
prior_builds
=
latest_builds
.
where
.
not
(
stage:
next_stages
)
status
=
prior_builds
.
status
prior_
status
=
prior_builds
.
status
# create builds for next stages based
# create builds for next stages based
next_stages
.
any?
do
|
stage
|
next_stages
.
any?
do
|
stage
|
CreateBuildsService
.
new
(
self
).
execute
(
stage
,
build
.
user
,
status
,
build
.
trigger_request
).
present?
CreateBuildsService
.
new
(
self
).
execute
(
stage
,
build
.
user
,
prior_
status
,
build
.
trigger_request
).
present?
end
end
end
end
...
...
lib/ci/status.rb
deleted
100644 → 0
View file @
ac50f9dd
module
Ci
class
Status
def
self
.
get_status
(
statuses
)
if
statuses
.
none?
'skipped'
elsif
statuses
.
all?
{
|
status
|
status
.
success?
||
status
.
ignored?
}
'success'
elsif
statuses
.
all?
(
&
:pending?
)
'pending'
elsif
statuses
.
any?
(
&
:running?
)
||
statuses
.
any?
(
&
:pending?
)
'running'
elsif
statuses
.
all?
(
&
:canceled?
)
'canceled'
else
'failed'
end
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