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
91fdf8c3
Commit
91fdf8c3
authored
Apr 20, 2020
by
Lee Tickett
Committed by
Shinya Maeda
Apr 20, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove `ci_expose_arbitrary_artifacts_in_mr` feature flag
parent
5436f298
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
5 additions
and
54 deletions
+5
-54
app/models/merge_request.rb
app/models/merge_request.rb
+0
-2
changelogs/unreleased/remove_ci_expose_arbitrary_artifacts_in_mr_feature_flag.yml
...move_ci_expose_arbitrary_artifacts_in_mr_feature_flag.yml
+5
-0
lib/gitlab/ci/config/entry/artifacts.rb
lib/gitlab/ci/config/entry/artifacts.rb
+0
-2
spec/controllers/projects/merge_requests_controller_spec.rb
spec/controllers/projects/merge_requests_controller_spec.rb
+0
-28
spec/lib/gitlab/ci/config/entry/artifacts_spec.rb
spec/lib/gitlab/ci/config/entry/artifacts_spec.rb
+0
-22
No files found.
app/models/merge_request.rb
View file @
91fdf8c3
...
...
@@ -1350,8 +1350,6 @@ class MergeRequest < ApplicationRecord
end
def
has_exposed_artifacts?
return
false
unless
Feature
.
enabled?
(
:ci_expose_arbitrary_artifacts_in_mr
,
default_enabled:
true
)
actual_head_pipeline
&
.
has_exposed_artifacts?
end
...
...
changelogs/unreleased/remove_ci_expose_arbitrary_artifacts_in_mr_feature_flag.yml
0 → 100644
View file @
91fdf8c3
---
title
:
Remove ci_expose_arbitrary_artifacts_in_mr feature flag
merge_request
:
29363
author
:
Lee Tickett
type
:
other
lib/gitlab/ci/config/entry/artifacts.rb
View file @
91fdf8c3
...
...
@@ -50,8 +50,6 @@ module Gitlab
end
def
expose_as_present?
return
false
unless
Feature
.
enabled?
(
:ci_expose_arbitrary_artifacts_in_mr
,
default_enabled:
true
)
# This duplicates the `validates :config, type: Hash` above,
# but Validatable currently doesn't halt the validation
# chain if it encounters a validation error.
...
...
spec/controllers/projects/merge_requests_controller_spec.rb
View file @
91fdf8c3
...
...
@@ -935,34 +935,6 @@ describe Projects::MergeRequestsController do
}])
end
end
context
'when feature flag :ci_expose_arbitrary_artifacts_in_mr is disabled'
do
let
(
:job_options
)
do
{
artifacts:
{
paths:
[
'ci_artifacts.txt'
],
expose_as:
'Exposed artifact'
}
}
end
let
(
:report
)
{
double
}
before
do
stub_feature_flags
(
ci_expose_arbitrary_artifacts_in_mr:
false
)
end
it
'does not send polling interval'
do
expect
(
Gitlab
::
PollingInterval
).
not_to
receive
(
:set_header
)
subject
end
it
'returns 204 HTTP status'
do
subject
expect
(
response
).
to
have_gitlab_http_status
(
:no_content
)
end
end
end
context
'when pipeline does not have jobs with exposed artifacts'
do
...
...
spec/lib/gitlab/ci/config/entry/artifacts_spec.rb
View file @
91fdf8c3
...
...
@@ -123,28 +123,6 @@ describe Gitlab::Ci::Config::Entry::Artifacts do
end
end
end
context
'when feature flag :ci_expose_arbitrary_artifacts_in_mr is disabled'
do
before
do
stub_feature_flags
(
ci_expose_arbitrary_artifacts_in_mr:
false
)
end
context
'when syntax is correct'
do
let
(
:config
)
{
{
expose_as:
'Test results'
,
paths:
[
'test.txt'
]
}
}
it
'is valid'
do
expect
(
entry
.
errors
).
to
be_empty
end
end
context
'when syntax for :expose_as is incorrect'
do
let
(
:config
)
{
{
paths:
%w[results.txt]
,
expose_as:
''
}
}
it
'is valid'
do
expect
(
entry
.
errors
).
to
be_empty
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