Commit 149d9f73 authored by drew cimino's avatar drew cimino

Feature flag for variables with potentially long values

parent 84046205
......@@ -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(','))
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment