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
f78f1173
Commit
f78f1173
authored
Jun 16, 2020
by
Furkan Ayhan
Committed by
Igor Drozdov
Jun 16, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove FF ci_dependency_variables
So it will be enabled by default for all instances
parent
24e396c3
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
40 deletions
+10
-40
app/models/concerns/ci/contextable.rb
app/models/concerns/ci/contextable.rb
+1
-1
changelogs/unreleased/217834-remove-FF-ci_dependency_variables.yml
...s/unreleased/217834-remove-FF-ci_dependency_variables.yml
+5
-0
doc/ci/variables/README.md
doc/ci/variables/README.md
+2
-21
spec/models/ci/build_spec.rb
spec/models/ci/build_spec.rb
+2
-18
No files found.
app/models/concerns/ci/contextable.rb
View file @
f78f1173
...
...
@@ -18,7 +18,7 @@ module Ci
variables
.
concat
(
deployment_variables
(
environment:
environment
))
variables
.
concat
(
yaml_variables
)
variables
.
concat
(
user_variables
)
variables
.
concat
(
dependency_variables
)
if
Feature
.
enabled?
(
:ci_dependency_variables
,
project
)
variables
.
concat
(
dependency_variables
)
variables
.
concat
(
secret_instance_variables
)
variables
.
concat
(
secret_group_variables
)
variables
.
concat
(
secret_project_variables
(
environment:
environment
))
...
...
changelogs/unreleased/217834-remove-FF-ci_dependency_variables.yml
0 → 100644
View file @
f78f1173
---
title
:
Enable CI Inheriting Env Variables feature
merge_request
:
34495
author
:
type
:
added
doc/ci/variables/README.md
View file @
f78f1173
...
...
@@ -474,8 +474,8 @@ Feature.enable(:instance_variables_ui)
## Inherit environment variables
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/22638) in GitLab 13.0.
> -
It's deployed behind a feature flag (`ci_dependency_variables`), disabled by default
.
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/22638) in GitLab 13.0
behind a disabled [feature flag](../../administration/feature_flags.md): `ci_dependency_variables`
.
> -
[Feature flag removed](https://gitlab.com/gitlab-org/gitlab/-/issues/217834) in GitLab 13.1
.
You can inherit environment variables from dependent jobs.
...
...
@@ -520,25 +520,6 @@ deploy:
artifacts
:
true
```
### Enable inherited environment variables **(CORE ONLY)**
The Inherited Environment Variables feature is under development and not ready for production use. It is
deployed behind a feature flag that is
**disabled by default**
.
[
GitLab administrators with access to the GitLab Rails console
](
../../administration/feature_flags.md
)
can enable it for your instance.
To enable it:
```
ruby
Feature
.
enable
(
:ci_dependency_variables
)
```
To disable it:
```
ruby
Feature
.
disable
(
:ci_dependency_variables
)
```
## Priority of environment variables
Variables of different types can take precedence over other
...
...
spec/models/ci/build_spec.rb
View file @
f78f1173
...
...
@@ -3123,24 +3123,8 @@ describe Ci::Build do
let!
(
:job_variable
)
{
create
(
:ci_job_variable
,
:dotenv_source
,
job:
prepare
)
}
context
'FF ci_dependency_variables is enabled'
do
before
do
stub_feature_flags
(
ci_dependency_variables:
true
)
end
it
'inherits dependent variables'
do
expect
(
build
.
scoped_variables
.
to_hash
).
to
include
(
job_variable
.
key
=>
job_variable
.
value
)
end
end
context
'FF ci_dependency_variables is disabled'
do
before
do
stub_feature_flags
(
ci_dependency_variables:
false
)
end
it
'does not inherit dependent variables'
do
expect
(
build
.
scoped_variables
.
to_hash
).
not_to
include
(
job_variable
.
key
=>
job_variable
.
value
)
end
it
'inherits dependent variables'
do
expect
(
build
.
scoped_variables
.
to_hash
).
to
include
(
job_variable
.
key
=>
job_variable
.
value
)
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