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