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
c18c33e7
Commit
c18c33e7
authored
Aug 07, 2020
by
Jaime Martinez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove `:ci_release_generation` feature flag
Removes `:ci_release_generation` and related tests.
parent
7af7c7dd
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
5 additions
and
36 deletions
+5
-36
app/models/ci/build.rb
app/models/ci/build.rb
+1
-2
lib/gitlab/ci/build/step.rb
lib/gitlab/ci/build/step.rb
+0
-2
lib/gitlab/ci/config/entry/job.rb
lib/gitlab/ci/config/entry/job.rb
+0
-6
lib/gitlab/ci/features.rb
lib/gitlab/ci/features.rb
+0
-4
lib/gitlab/ci/yaml_processor.rb
lib/gitlab/ci/yaml_processor.rb
+1
-1
spec/lib/gitlab/ci/yaml_processor_spec.rb
spec/lib/gitlab/ci/yaml_processor_spec.rb
+3
-20
spec/services/ci/create_pipeline_service_spec.rb
spec/services/ci/create_pipeline_service_spec.rb
+0
-1
No files found.
app/models/ci/build.rb
View file @
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
)
...
...
lib/gitlab/ci/build/step.rb
View file @
c18c33e7
...
@@ -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
...
...
lib/gitlab/ci/config/entry/job.rb
View file @
c18c33e7
...
@@ -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
...
...
lib/gitlab/ci/features.rb
View file @
c18c33e7
...
@@ -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
)
...
...
lib/gitlab/ci/yaml_processor.rb
View file @
c18c33e7
...
@@ -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
)
...
...
spec/lib/gitlab/ci/yaml_processor_spec.rb
View file @
c18c33e7
...
@@ -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
...
...
spec/services/ci/create_pipeline_service_spec.rb
View file @
c18c33e7
...
@@ -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
...
...
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