Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
767b6731
Commit
767b6731
authored
Jan 17, 2020
by
Sean Carroll
Committed by
Lin Jen-Shin
Jan 17, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Feature flag for release generation
parent
ecb728d1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
lib/gitlab/ci/config/entry/job.rb
lib/gitlab/ci/config/entry/job.rb
+6
-0
spec/lib/gitlab/ci/yaml_processor_spec.rb
spec/lib/gitlab/ci/yaml_processor_spec.rb
+3
-3
No files found.
lib/gitlab/ci/config/entry/job.rb
View file @
767b6731
...
@@ -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
...
...
spec/lib/gitlab/ci/yaml_processor_spec.rb
View file @
767b6731
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment