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
25ba11a2
Commit
25ba11a2
authored
Jul 01, 2019
by
Thong Kuah
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove un-used method
We stopped calling the fallback so we can remove this now
parent
a2cd33d1
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
33 deletions
+0
-33
app/models/deployment.rb
app/models/deployment.rb
+0
-5
spec/models/deployment_spec.rb
spec/models/deployment_spec.rb
+0
-28
No files found.
app/models/deployment.rb
View file @
25ba11a2
...
...
@@ -85,11 +85,6 @@ class Deployment < ApplicationRecord
Commit
.
truncate_sha
(
sha
)
end
# Deprecated - will be replaced by a persisted cluster_id
def
deployment_platform_cluster
environment
.
deployment_platform
&
.
cluster
end
def
execute_hooks
deployment_data
=
Gitlab
::
DataBuilder
::
Deployment
.
build
(
self
)
project
.
execute_services
(
deployment_data
,
:deployment_hooks
)
...
...
spec/models/deployment_spec.rb
View file @
25ba11a2
...
...
@@ -322,32 +322,4 @@ describe Deployment do
end
end
end
describe
'#deployment_platform_cluster'
do
let
(
:deployment
)
{
create
(
:deployment
)
}
let
(
:project
)
{
deployment
.
project
}
let
(
:environment
)
{
deployment
.
environment
}
subject
{
deployment
.
deployment_platform_cluster
}
before
do
expect
(
project
).
to
receive
(
:deployment_platform
)
.
with
(
environment:
environment
.
name
).
and_call_original
end
context
'project has no deployment platform'
do
before
do
expect
(
project
.
clusters
).
to
be_empty
end
it
{
is_expected
.
to
be_nil
}
end
context
'project has a deployment platform'
do
let!
(
:cluster
)
{
create
(
:cluster
,
projects:
[
project
])
}
let!
(
:platform
)
{
create
(
:cluster_platform_kubernetes
,
cluster:
cluster
)
}
it
{
is_expected
.
to
eq
cluster
}
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