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
149d9f73
Commit
149d9f73
authored
May 08, 2020
by
drew cimino
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Feature flag for variables with potentially long values
parent
84046205
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
1 deletion
+12
-1
app/models/ci/build.rb
app/models/ci/build.rb
+1
-1
spec/models/ci/build_spec.rb
spec/models/ci/build_spec.rb
+11
-0
No files found.
app/models/ci/build.rb
View file @
149d9f73
...
...
@@ -568,7 +568,7 @@ module Ci
def
environment_changed_page_variables
Gitlab
::
Ci
::
Variables
::
Collection
.
new
.
tap
do
|
variables
|
break
variables
unless
environment_status
break
variables
unless
environment_status
&&
Feature
.
enabled?
(
:modifed_path_ci_variables
,
project
)
variables
.
append
(
key:
'CI_MERGE_REQUEST_CHANGED_PAGE_PATHS'
,
value:
environment_status
.
changed_paths
.
join
(
','
))
variables
.
append
(
key:
'CI_MERGE_REQUEST_CHANGED_PAGE_URLS'
,
value:
environment_status
.
changed_urls
.
join
(
','
))
...
...
spec/models/ci/build_spec.rb
View file @
149d9f73
...
...
@@ -2495,6 +2495,17 @@ describe Ci::Build do
end
end
end
context
'with the :modified_path_ci_variables feature flag disabled'
do
before
do
stub_feature_flags
(
modified_path_ci_variables:
false
)
end
it
'does not set CI_MERGE_REQUEST_CHANGED_PAGES_* variables'
do
expect
(
subject
.
find
{
|
var
|
var
[
:key
]
==
'CI_MERGE_REQUEST_CHANGED_PAGE_PATHS'
}).
to
be_nil
expect
(
subject
.
find
{
|
var
|
var
[
:key
]
==
'CI_MERGE_REQUEST_CHANGED_PAGE_URLS'
}).
to
be_nil
end
end
end
context
'when build has user'
do
...
...
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