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