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
40c2617d
Commit
40c2617d
authored
Nov 30, 2017
by
Shinya Maeda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add where(environment_scope: *) to deployment_platform
parent
75d58a39
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
app/models/project.rb
app/models/project.rb
+1
-1
ee/app/models/ee/project.rb
ee/app/models/ee/project.rb
+1
-1
No files found.
app/models/project.rb
View file @
40c2617d
...
...
@@ -906,7 +906,7 @@ class Project < ActiveRecord::Base
end
def
deployment_platform
@deployment_platform
||=
clusters
.
find_by
(
enabled:
true
)
&
.
platform_kubernetes
@deployment_platform
||=
clusters
.
where
(
environment_scope:
'*'
).
find_by
(
enabled:
true
)
&
.
platform_kubernetes
@deployment_platform
||=
services
.
where
(
category: :deployment
).
reorder
(
nil
).
find_by
(
active:
true
)
end
...
...
ee/app/models/ee/project.rb
View file @
40c2617d
...
...
@@ -261,7 +261,7 @@ module EE
cluster
.
matches?
(
environment
)
# TODO: This is the same logic with Environment Variable
end
.
first
&
.
platform_kubernetes
@deployment_platform
||=
services
.
where
(
category: :deployment
).
reorder
(
nil
).
find_by
(
active:
true
)
super
# Wildcard or KubernetesService
end
def
secret_variables_for
(
ref
:,
environment:
nil
)
...
...
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