Commit 441ed453 authored by Aishwarya Subramanian's avatar Aishwarya Subramanian

Enable variables_in_include_section_ci feature by default

Removed YAML definition for the feature flag
Removed all references and associated specs
Docs updated to reflect the rollout issue
parent 409a76e1
---
title: Support Project variables in `include` section of `gitlab-ci.yml`
merge_request: 52108
author:
type: added
---
name: variables_in_include_section_ci
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/50188/
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/294294
milestone: '13.8'
type: development
group: group::compliance
default_enabled: false
......@@ -377,16 +377,10 @@ NOTE:
Use merging to customize and override included CI/CD configurations with local
definitions. Local definitions in `.gitlab-ci.yml` override included definitions.
#### Variables with `include`
#### Variables with `include` **(CORE ONLY)**
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/284883) in GitLab 13.8.
> - It's [deployed behind a feature flag](../../user/feature_flags.md), disabled by default.
> - It's disabled on GitLab.com.
> - It's not recommended for production use.
> - To use it in GitLab self-managed instances, ask a GitLab administrator to [enable it](#enable-or-disable-includepredefined-project-variables). **(CORE ONLY)**
WARNING:
This feature might not be available to you. Check the **version history** note above for details.
> - [Feature flag removed](https://gitlab.com/gitlab-org/gitlab/-/issues/294294) in GitLab 13.9.
You can [use some predefined variables in `include` sections](../variables/where_variables_can_be_used.md#gitlab-ciyml-file)
in your `.gitlab-ci.yml`:
......@@ -400,25 +394,6 @@ include:
For an example of how you can include these predefined variables, and their impact on CI jobs,
see the following [CI variable demo](https://youtu.be/4XR8gw3Pkos).
##### Enable or disable include:predefined-project-variables **(CORE ONLY)**
Use of predefined project variables in `include` section of `.gitlab-ci.yml` 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.
To enable it:
```ruby
Feature.enable(:variables_in_include_section_ci)
```
To disable it:
```ruby
Feature.disable(:variables_in_include_section_ci)
```
#### `include:local`
`include:local` includes a file from the same repository as `.gitlab-ci.yml`.
......
......@@ -99,8 +99,6 @@ module Gitlab
end
def expand_variables(data)
return data unless ::Feature.enabled?(:variables_in_include_section_ci)
if data.is_a?(String)
expand(data)
else
......
......@@ -323,20 +323,6 @@ RSpec.describe Gitlab::Ci::Config::External::Mapper do
expect { subject }.to raise_error(described_class::AmbigiousSpecificationError)
end
end
context 'when feature flag is turned off' do
let(:values) do
{ include: full_local_file_path }
end
before do
stub_feature_flags(variables_in_include_section_ci: false)
end
it 'does not expand the variables' do
expect(subject[0].location).to eq('$CI_PROJECT_PATH' + local_file)
end
end
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment