Commit 60cb160c authored by Dylan Griffith's avatar Dylan Griffith

Merge branch '337507-remove-ci_include_rules' into 'master'

Remove the FF ci_include_rules

See merge request gitlab-org/gitlab!72122
parents 3b3dce4a 53e9d5fb
---
name: ci_include_rules
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/67409
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/337507
milestone: '14.2'
type: development
group: group::pipeline authoring
default_enabled: true
...@@ -446,12 +446,11 @@ that proposes expanding this feature to support more variables. ...@@ -446,12 +446,11 @@ that proposes expanding this feature to support more variables.
#### `rules` with `include` #### `rules` with `include`
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/276515) in GitLab 14.2. > - Introduced in GitLab 14.2 [with a flag](../../administration/feature_flags.md) named `ci_include_rules`. Disabled by default.
> - [Enabled on GitLab.com](https://gitlab.com/gitlab-org/gitlab/-/issues/337507) in GitLab 14.3 and is ready for production use. > - [Enabled on GitLab.com](https://gitlab.com/gitlab-org/gitlab/-/issues/337507) in GitLab 14.3.
> - [Enabled with `ci_include_rules` flag](https://gitlab.com/gitlab-org/gitlab/-/issues/337507) for self-managed GitLab in GitLab 14.3 and is ready for production use. > - [Enabled on self-managed](https://gitlab.com/gitlab-org/gitlab/-/issues/337507) GitLab 14.3.
> - [Feature flag `ci_include_rules` removed](https://gitlab.com/gitlab-org/gitlab/-/issues/337507) in GitLab 14.4.
FLAG: > - [Generally available](https://gitlab.com/gitlab-org/gitlab/-/issues/337507) in GitLab 14.4.
On self-managed GitLab, by default this feature is available. To hide the feature per project or for your entire instance, ask an administrator to [disable the `ci_include_rules` flag](../../administration/feature_flags.md). On GitLab.com, this feature is available.
You can use [`rules`](#rules) with `include` to conditionally include other configuration files. You can use [`rules`](#rules) with `include` to conditionally include other configuration files.
You can only use [`if` rules](#rulesif) in `include`, and only with [certain variables](#variables-with-include). You can only use [`if` rules](#rulesif) in `include`, and only with [certain variables](#variables-with-include).
......
...@@ -58,9 +58,6 @@ module Gitlab ...@@ -58,9 +58,6 @@ module Gitlab
end end
def verify_rules(location) def verify_rules(location)
# Behaves like there is no `rules`
return location unless ::Feature.enabled?(:ci_include_rules, context.project, default_enabled: :yaml)
return unless Rules.new(location[:rules]).evaluate(context).pass? return unless Rules.new(location[:rules]).evaluate(context).pass?
location location
......
...@@ -363,17 +363,6 @@ RSpec.describe Gitlab::Ci::Config::External::Mapper do ...@@ -363,17 +363,6 @@ RSpec.describe Gitlab::Ci::Config::External::Mapper do
expect(subject).to contain_exactly(an_instance_of(Gitlab::Ci::Config::External::File::Remote), expect(subject).to contain_exactly(an_instance_of(Gitlab::Ci::Config::External::File::Remote),
an_instance_of(Gitlab::Ci::Config::External::File::Local)) an_instance_of(Gitlab::Ci::Config::External::File::Local))
end end
context 'when the FF ci_include_rules is disabled' do
before do
stub_feature_flags(ci_include_rules: false)
end
it 'includes the file' do
expect(subject).to contain_exactly(an_instance_of(Gitlab::Ci::Config::External::File::Remote),
an_instance_of(Gitlab::Ci::Config::External::File::Local))
end
end
end end
context 'when the rules does not match' do context 'when the rules does not match' do
...@@ -382,17 +371,6 @@ RSpec.describe Gitlab::Ci::Config::External::Mapper do ...@@ -382,17 +371,6 @@ RSpec.describe Gitlab::Ci::Config::External::Mapper do
it 'does not include the file' do it 'does not include the file' do
expect(subject).to contain_exactly(an_instance_of(Gitlab::Ci::Config::External::File::Remote)) expect(subject).to contain_exactly(an_instance_of(Gitlab::Ci::Config::External::File::Remote))
end end
context 'when the FF ci_include_rules is disabled' do
before do
stub_feature_flags(ci_include_rules: false)
end
it 'includes the file' do
expect(subject).to contain_exactly(an_instance_of(Gitlab::Ci::Config::External::File::Remote),
an_instance_of(Gitlab::Ci::Config::External::File::Local))
end
end
end end
end end
end end
......
...@@ -58,17 +58,6 @@ RSpec.describe Ci::CreatePipelineService do ...@@ -58,17 +58,6 @@ RSpec.describe Ci::CreatePipelineService do
expect(pipeline).to be_created_successfully expect(pipeline).to be_created_successfully
expect(pipeline.processables.pluck(:name)).to contain_exactly('job', 'rspec') expect(pipeline.processables.pluck(:name)).to contain_exactly('job', 'rspec')
end end
context 'when the FF ci_include_rules is disabled' do
before do
stub_feature_flags(ci_include_rules: false)
end
it 'includes the job in the file' do
expect(pipeline).to be_created_successfully
expect(pipeline.processables.pluck(:name)).to contain_exactly('job', 'rspec')
end
end
end end
context 'when the rules does not match' do context 'when the rules does not match' do
...@@ -78,17 +67,6 @@ RSpec.describe Ci::CreatePipelineService do ...@@ -78,17 +67,6 @@ RSpec.describe Ci::CreatePipelineService do
expect(pipeline).to be_created_successfully expect(pipeline).to be_created_successfully
expect(pipeline.processables.pluck(:name)).to contain_exactly('job') expect(pipeline.processables.pluck(:name)).to contain_exactly('job')
end end
context 'when the FF ci_include_rules is disabled' do
before do
stub_feature_flags(ci_include_rules: false)
end
it 'includes the job in the file' do
expect(pipeline).to be_created_successfully
expect(pipeline.processables.pluck(:name)).to contain_exactly('job', 'rspec')
end
end
end 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