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
42f4481d
Commit
42f4481d
authored
Apr 21, 2017
by
Sean McGivern
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'canaries-first' into 'master'
Show canaries first Closes #2216 See merge request !1685
parents
17e57b8b
dd568462
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
3 deletions
+8
-3
lib/gitlab/kubernetes/deployment.rb
lib/gitlab/kubernetes/deployment.rb
+4
-0
lib/gitlab/kubernetes/rollout_status.rb
lib/gitlab/kubernetes/rollout_status.rb
+1
-0
spec/lib/gitlab/kubernetes/rollout_status_spec.rb
spec/lib/gitlab/kubernetes/rollout_status_spec.rb
+3
-3
No files found.
lib/gitlab/kubernetes/deployment.rb
View file @
42f4481d
...
@@ -21,6 +21,10 @@ module Gitlab
...
@@ -21,6 +21,10 @@ module Gitlab
track
==
'stable'
track
==
'stable'
end
end
def
order
stable?
?
1
:
0
end
def
outdated?
def
outdated?
observed_generation
<
generation
observed_generation
<
generation
end
end
...
...
lib/gitlab/kubernetes/rollout_status.rb
View file @
42f4481d
...
@@ -20,6 +20,7 @@ module Gitlab
...
@@ -20,6 +20,7 @@ module Gitlab
return
new
([],
valid:
false
)
if
specs
.
empty?
return
new
([],
valid:
false
)
if
specs
.
empty?
deployments
=
specs
.
map
{
|
spec
|
::
Gitlab
::
Kubernetes
::
Deployment
.
new
(
spec
)
}
deployments
=
specs
.
map
{
|
spec
|
::
Gitlab
::
Kubernetes
::
Deployment
.
new
(
spec
)
}
deployments
.
sort_by!
(
&
:order
)
new
(
deployments
)
new
(
deployments
)
end
end
...
...
spec/lib/gitlab/kubernetes/rollout_status_spec.rb
View file @
42f4481d
...
@@ -53,12 +53,12 @@ describe Gitlab::Kubernetes::RolloutStatus do
...
@@ -53,12 +53,12 @@ describe Gitlab::Kubernetes::RolloutStatus do
it
'stores the union of deployment instances'
do
it
'stores the union of deployment instances'
do
expected
=
[
expected
=
[
{
status:
'finished'
,
tooltip:
'one (pod 0) Finished'
,
track:
'stable'
,
stable:
true
},
{
status:
'finished'
,
tooltip:
'one (pod 1) Finished'
,
track:
'stable'
,
stable:
true
},
{
status:
'finished'
,
tooltip:
'one (pod 2) Finished'
,
track:
'stable'
,
stable:
true
},
{
status:
'finished'
,
tooltip:
'two (pod 0) Finished'
,
track:
'canary'
,
stable:
false
},
{
status:
'finished'
,
tooltip:
'two (pod 0) Finished'
,
track:
'canary'
,
stable:
false
},
{
status:
'finished'
,
tooltip:
'two (pod 1) Finished'
,
track:
'canary'
,
stable:
false
},
{
status:
'finished'
,
tooltip:
'two (pod 1) Finished'
,
track:
'canary'
,
stable:
false
},
{
status:
'finished'
,
tooltip:
'two (pod 2) Finished'
,
track:
'canary'
,
stable:
false
},
{
status:
'finished'
,
tooltip:
'two (pod 2) Finished'
,
track:
'canary'
,
stable:
false
},
{
status:
'finished'
,
tooltip:
'one (pod 0) Finished'
,
track:
'stable'
,
stable:
true
},
{
status:
'finished'
,
tooltip:
'one (pod 1) Finished'
,
track:
'stable'
,
stable:
true
},
{
status:
'finished'
,
tooltip:
'one (pod 2) Finished'
,
track:
'stable'
,
stable:
true
},
]
]
expect
(
rollout_status
.
instances
).
to
eq
(
expected
)
expect
(
rollout_status
.
instances
).
to
eq
(
expected
)
...
...
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