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
825d7596
Commit
825d7596
authored
Apr 26, 2019
by
Tiger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix deployments for Kubernetes service templates
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/27687
parent
6246979a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
1 deletion
+16
-1
app/models/deployment.rb
app/models/deployment.rb
+5
-1
changelogs/unreleased/60821-deployment-jobs-broken-as-of-11-10-0.yml
...unreleased/60821-deployment-jobs-broken-as-of-11-10-0.yml
+5
-0
spec/models/deployment_spec.rb
spec/models/deployment_spec.rb
+6
-0
No files found.
app/models/deployment.rb
View file @
825d7596
...
@@ -85,7 +85,11 @@ class Deployment < ApplicationRecord
...
@@ -85,7 +85,11 @@ class Deployment < ApplicationRecord
end
end
def
cluster
def
cluster
project
.
deployment_platform
(
environment:
environment
.
name
)
&
.
cluster
platform
=
project
.
deployment_platform
(
environment:
environment
.
name
)
if
platform
.
present?
&&
platform
.
respond_to?
(
:cluster
)
platform
.
cluster
end
end
end
def
execute_hooks
def
execute_hooks
...
...
changelogs/unreleased/60821-deployment-jobs-broken-as-of-11-10-0.yml
0 → 100644
View file @
825d7596
---
title
:
Fix Kubernetes service template deployment jobs broken as of 11.10.0
merge_request
:
27687
author
:
type
:
fixed
spec/models/deployment_spec.rb
View file @
825d7596
...
@@ -400,6 +400,12 @@ describe Deployment do
...
@@ -400,6 +400,12 @@ describe Deployment do
it
{
is_expected
.
to
be_nil
}
it
{
is_expected
.
to
be_nil
}
end
end
context
'project uses the kubernetes service for deployments'
do
let!
(
:service
)
{
create
(
:kubernetes_service
,
project:
project
)
}
it
{
is_expected
.
to
be_nil
}
end
context
'project has a deployment platform'
do
context
'project has a deployment platform'
do
let!
(
:cluster
)
{
create
(
:cluster
,
projects:
[
project
])
}
let!
(
:cluster
)
{
create
(
:cluster
,
projects:
[
project
])
}
let!
(
:platform
)
{
create
(
:cluster_platform_kubernetes
,
cluster:
cluster
)
}
let!
(
:platform
)
{
create
(
:cluster_platform_kubernetes
,
cluster:
cluster
)
}
...
...
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