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
ffb1fab4
Commit
ffb1fab4
authored
Feb 06, 2018
by
Dylan Griffith
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Expose GITLAB_FEATURES as CI/CD variable (fixes #40994)
parent
4457cf9d
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
0 deletions
+11
-0
app/models/ci/build.rb
app/models/ci/build.rb
+1
-0
app/models/namespace.rb
app/models/namespace.rb
+4
-0
changelogs/unreleased/40994-expose-features-as-ci-cd-variable.yml
...gs/unreleased/40994-expose-features-as-ci-cd-variable.yml
+5
-0
spec/models/ci/build_spec.rb
spec/models/ci/build_spec.rb
+1
-0
No files found.
app/models/ci/build.rb
View file @
ffb1fab4
...
...
@@ -543,6 +543,7 @@ module Ci
variables
=
[
{
key:
'CI'
,
value:
'true'
,
public:
true
},
{
key:
'GITLAB_CI'
,
value:
'true'
,
public:
true
},
{
key:
'GITLAB_FEATURES'
,
value:
project
.
namespace
.
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
},
...
...
app/models/namespace.rb
View file @
ffb1fab4
...
...
@@ -243,6 +243,10 @@ class Namespace < ActiveRecord::Base
all_projects
.
with_storage_feature
(
:repository
).
find_each
(
&
:remove_exports
)
end
def
features
[]
end
private
def
path_or_parent_changed?
...
...
changelogs/unreleased/40994-expose-features-as-ci-cd-variable.yml
0 → 100644
View file @
ffb1fab4
---
title
:
'
Expose
GITLAB_FEATURES
as
CI/CD
variable
(fixes
#40994)'
merge_request
:
author
:
type
:
added
spec/models/ci/build_spec.rb
View file @
ffb1fab4
...
...
@@ -1413,6 +1413,7 @@ describe Ci::Build do
[
{
key:
'CI'
,
value:
'true'
,
public:
true
},
{
key:
'GITLAB_CI'
,
value:
'true'
,
public:
true
},
{
key:
'GITLAB_FEATURES'
,
value:
''
,
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