Commit 07e44622 authored by Markus Koller's avatar Markus Koller

Merge branch '229515-remove-ci-release-generation-feature-flag' into 'master'

Remove `:ci_release_generation` feature flag

Closes #229515

See merge request gitlab-org/gitlab!38873
parents f407d692 c18c33e7
......@@ -857,8 +857,7 @@ module Ci
end
def multi_build_steps?
options.dig(:release)&.any? &&
Gitlab::Ci::Features.release_generation_enabled?
options.dig(:release)&.any?
end
def hide_secrets(trace)
......
......@@ -21,8 +21,6 @@ module Gitlab
end
def from_release(job)
return unless Gitlab::Ci::Features.release_generation_enabled?
release = job.options[:release]
return unless release
......
......@@ -22,12 +22,6 @@ module Gitlab
validates :config, allowed_keys: ALLOWED_KEYS + PROCESSABLE_ALLOWED_KEYS
validates :config, required_keys: REQUIRED_BY_NEEDS, if: :has_needs?
validates :script, presence: true
validates :config,
disallowed_keys: {
in: %i[release],
message: 'release features are not enabled'
},
unless: -> { Gitlab::Ci::Features.release_generation_enabled? }
with_options allow_nil: true do
validates :allow_failure, boolean: true
......
......@@ -34,10 +34,6 @@ module Gitlab
Feature.enabled?(:ci_pipeline_status_omit_commit_sha_in_cache_key, project, default_enabled: true)
end
def self.release_generation_enabled?
::Feature.enabled?(:ci_release_generation, default_enabled: true)
end
# Remove in https://gitlab.com/gitlab-org/gitlab/-/issues/224199
def self.store_pipeline_messages?(project)
::Feature.enabled?(:ci_store_pipeline_messages, project, default_enabled: true)
......
......@@ -115,7 +115,7 @@ module Gitlab
end
def release(job)
job[:release] if Gitlab::Ci::Features.release_generation_enabled?
job[:release]
end
def stage_builds_attributes(stage)
......
......@@ -1641,26 +1641,9 @@ module Gitlab
}
end
context 'with feature flag active' do
before do
stub_feature_flags(ci_release_generation: true)
end
it "returns release info" do
expect(processor.stage_builds_attributes('release').first[:options])
.to eq(config[:release].except(:stage, :only))
end
end
context 'with feature flag inactive' do
before do
stub_feature_flags(ci_release_generation: false)
end
it 'raises error' do
expect { processor }.to raise_error(
'jobs:release config release features are not enabled: release')
end
it "returns release info" do
expect(processor.stage_builds_attributes('release').first[:options])
.to eq(config[:release].except(:stage, :only))
end
end
......
......@@ -982,7 +982,6 @@ RSpec.describe Ci::CreatePipelineService do
context 'with release' do
shared_examples_for 'a successful release pipeline' do
before do
stub_feature_flags(ci_release_generation: true)
stub_ci_pipeline_yaml_file(YAML.dump(config))
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