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
Boxiang Sun
gitlab-ce
Commits
9d4c9272
Commit
9d4c9272
authored
Mar 12, 2018
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Document runner's expecations regarding variable collection
parent
a194b198
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
+11
-6
lib/gitlab/ci/variables/collection.rb
lib/gitlab/ci/variables/collection.rb
+11
-6
No files found.
lib/gitlab/ci/variables/collection.rb
View file @
9d4c9272
...
...
@@ -27,10 +27,15 @@ module Gitlab
end
end
##
# If `file: true` has been provided we expose it, otherwise we
# don't expose `file` attribute at all (stems from what the runner
# expects).
#
def
to_runner_variables
self
.
map
do
|
variable
|
variable
.
to_h
.
reject
do
|
key
,
value
|
key
==
:file
&&
value
==
false
variable
.
to_h
.
reject
do
|
component
,
value
|
component
==
:file
&&
value
==
false
end
end
end
...
...
@@ -40,7 +45,7 @@ module Gitlab
def
fabricate
(
resource
)
case
resource
when
Hash
Variable
.
new
(
resource
.
fetch
(
:key
),
Collection
::
Variable
.
new
(
resource
.
fetch
(
:key
),
resource
.
fetch
(
:value
),
resource
.
fetch
(
:public
,
false
),
resource
.
fetch
(
:file
,
false
))
...
...
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