Merge branch '5320-fix-gitlab-features-env-var' into 'master'
Get GITLAB_FEATURES from Project#licensed_features instead of Namespace#features (#5320) See merge request gitlab-org/gitlab-ce!18189
This commit is contained in:
commit
6ef8b497e7
4 changed files with 6 additions and 6 deletions
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1875,6 +1875,10 @@ class Project < ActiveRecord::Base
|
|||
memoized_results[cache_key]
|
||||
end
|
||||
|
||||
def licensed_features
|
||||
[]
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def storage
|
||||
|
|
|
@ -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 },
|
||||
|
|
Loading…
Reference in a new issue