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
1f9e0f50
Commit
1f9e0f50
authored
Apr 28, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
08728868
6246979a
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 @
1f9e0f50
...
...
@@ -27,13 +27,9 @@ module Gitlab
# don't expose `file` attribute at all (stems from what the runner
# expects).
#
# If the `variable_masking` feature is enabled we expose the `masked`
# attribute, otherwise it's not exposed.
#
def
to_runner_variable
@variable
.
reject
do
|
hash_key
,
hash_value
|
(
hash_key
==
:file
&&
hash_value
==
false
)
||
(
hash_key
==
:masked
&&
!
Feature
.
enabled?
(
:variable_masking
))
hash_key
==
:file
&&
hash_value
==
false
end
end
...
...
spec/lib/gitlab/ci/variables/collection/item_spec.rb
View file @
1f9e0f50
...
...
@@ -137,19 +137,5 @@ describe Gitlab::Ci::Variables::Collection::Item do
.
to
eq
(
key:
'VAR'
,
value:
'value'
,
public:
true
,
file:
true
,
masked:
false
)
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
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