Commit 767b6731 authored by Sean Carroll's avatar Sean Carroll Committed by Lin Jen-Shin

Feature flag for release generation

parent ecb728d1
......@@ -35,6 +35,12 @@ module Gitlab
message: 'key may not be used with `rules`'
},
if: :has_rules?
validates :config,
disallowed_keys: {
in: %i[release],
message: 'release features are not enabled'
},
unless: -> { Feature.enabled?(:ci_release_generation, default_enabled: false) }
with_options allow_nil: true do
validates :allow_failure, boolean: true
......
......@@ -1331,9 +1331,9 @@ module Gitlab
stub_feature_flags(ci_release_generation: false)
end
it "returns release info" do
expect(processor.stage_builds_attributes('release').first[:options].include?(config[:release]))
.to be false
it 'raises error' do
expect { processor }.to raise_error(
'jobs:release config release features are not enabled: release')
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