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
0
Merge Requests
0
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
Jérome Perrin
gitlab-ce
Commits
5e3733da
Commit
5e3733da
authored
Apr 05, 2018
by
Dylan Griffith
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Get GITLAB_FEATURES from Project#licensed_features instead of Namespace#features (#5320)
parent
86ca1a77
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
6 deletions
+6
-6
app/models/ci/build.rb
app/models/ci/build.rb
+1
-1
app/models/namespace.rb
app/models/namespace.rb
+0
-4
app/models/project.rb
app/models/project.rb
+4
-0
spec/models/ci/build_spec.rb
spec/models/ci/build_spec.rb
+1
-1
No files found.
app/models/ci/build.rb
View file @
5e3733da
...
...
@@ -611,7 +611,7 @@ module Ci
Gitlab
::
Ci
::
Variables
::
Collection
.
new
.
tap
do
|
variables
|
variables
.
append
(
key:
'CI'
,
value:
'true'
)
variables
.
append
(
key:
'GITLAB_CI'
,
value:
'true'
)
variables
.
append
(
key:
'GITLAB_FEATURES'
,
value:
project
.
namespace
.
features
.
join
(
','
))
variables
.
append
(
key:
'GITLAB_FEATURES'
,
value:
project
.
licensed_
features
.
join
(
','
))
variables
.
append
(
key:
'CI_SERVER_NAME'
,
value:
'GitLab'
)
variables
.
append
(
key:
'CI_SERVER_VERSION'
,
value:
Gitlab
::
VERSION
)
variables
.
append
(
key:
'CI_SERVER_REVISION'
,
value:
Gitlab
::
REVISION
)
...
...
app/models/namespace.rb
View file @
5e3733da
...
...
@@ -248,10 +248,6 @@ class Namespace < ActiveRecord::Base
all_projects
.
with_storage_feature
(
:repository
).
find_each
(
&
:remove_exports
)
end
def
features
[]
end
def
refresh_project_authorizations
owner
.
refresh_authorized_projects
end
...
...
app/models/project.rb
View file @
5e3733da
...
...
@@ -1875,6 +1875,10 @@ class Project < ActiveRecord::Base
memoized_results
[
cache_key
]
end
def
licensed_features
[]
end
private
def
storage
...
...
spec/models/ci/build_spec.rb
View file @
5e3733da
...
...
@@ -1472,7 +1472,7 @@ describe Ci::Build do
{
key:
'CI_REPOSITORY_URL'
,
value:
build
.
repo_url
,
public:
false
},
{
key:
'CI'
,
value:
'true'
,
public:
true
},
{
key:
'GITLAB_CI'
,
value:
'true'
,
public:
true
},
{
key:
'GITLAB_FEATURES'
,
value:
project
.
namespace
.
features
.
join
(
','
),
public:
true
},
{
key:
'GITLAB_FEATURES'
,
value:
project
.
licensed_
features
.
join
(
','
),
public:
true
},
{
key:
'CI_SERVER_NAME'
,
value:
'GitLab'
,
public:
true
},
{
key:
'CI_SERVER_VERSION'
,
value:
Gitlab
::
VERSION
,
public:
true
},
{
key:
'CI_SERVER_REVISION'
,
value:
Gitlab
::
REVISION
,
public:
true
},
...
...
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