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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
07b5c503
Commit
07b5c503
authored
Apr 26, 2019
by
Matija Čupić
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove variable masking feature flag
parent
265b7894
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
19 deletions
+1
-19
lib/gitlab/ci/variables/collection/item.rb
lib/gitlab/ci/variables/collection/item.rb
+1
-5
spec/lib/gitlab/ci/variables/collection/item_spec.rb
spec/lib/gitlab/ci/variables/collection/item_spec.rb
+0
-14
No files found.
lib/gitlab/ci/variables/collection/item.rb
View file @
07b5c503
...
@@ -27,13 +27,9 @@ module Gitlab
...
@@ -27,13 +27,9 @@ module Gitlab
# don't expose `file` attribute at all (stems from what the runner
# don't expose `file` attribute at all (stems from what the runner
# expects).
# expects).
#
#
# If the `variable_masking` feature is enabled we expose the `masked`
# attribute, otherwise it's not exposed.
#
def
to_runner_variable
def
to_runner_variable
@variable
.
reject
do
|
hash_key
,
hash_value
|
@variable
.
reject
do
|
hash_key
,
hash_value
|
(
hash_key
==
:file
&&
hash_value
==
false
)
||
hash_key
==
:file
&&
hash_value
==
false
(
hash_key
==
:masked
&&
!
Feature
.
enabled?
(
:variable_masking
))
end
end
end
end
...
...
spec/lib/gitlab/ci/variables/collection/item_spec.rb
View file @
07b5c503
...
@@ -137,19 +137,5 @@ describe Gitlab::Ci::Variables::Collection::Item do
...
@@ -137,19 +137,5 @@ describe Gitlab::Ci::Variables::Collection::Item do
.
to
eq
(
key:
'VAR'
,
value:
'value'
,
public:
true
,
file:
true
,
masked:
false
)
.
to
eq
(
key:
'VAR'
,
value:
'value'
,
public:
true
,
file:
true
,
masked:
false
)
end
end
end
end
context
'when variable masking is disabled'
do
before
do
stub_feature_flags
(
variable_masking:
false
)
end
it
'does not expose the masked field to the runner'
do
runner_variable
=
described_class
.
new
(
key:
'VAR'
,
value:
'value'
,
masked:
true
)
.
to_runner_variable
expect
(
runner_variable
).
to
eq
(
key:
'VAR'
,
value:
'value'
,
public:
true
)
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