Commit 706422f9 authored by Kamil Trzciński's avatar Kamil Trzciński

Merge branch 'feature-flag-long-mr-variables' into 'master'

Feature flag for variables with potentially long values

See merge request gitlab-org/gitlab!31527
parents 4c9d2e3a 149d9f73
......@@ -576,7 +576,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(','))
......
......@@ -2512,6 +2512,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