Skip to content
Snippets Groups Projects
Unverified Commit 0ab8c735 authored by Harsha Muralidhar's avatar Harsha Muralidhar Committed by GitLab
Browse files

Disable selective execution when target branch is stable branch

parent aaa7711e
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -45,7 +45,7 @@ def qa_tests
#
# @return [String]
def fetch_list_of_specs_or_directories
if QA::Runtime::Env.selective_execution_improved_enabled? && non_qa_changes?
if QA::Runtime::Env.selective_execution_improved_enabled? && non_qa_changes? && !targeting_stable_branch?
tests = selective_tests_from_code_paths_mapping
logger.info("Selected tests from mapping: '#{tests}'")
tests.nil? || tests.empty? ? nil : tests.join(" ")
Loading
Loading
@@ -67,6 +67,10 @@ def framework_changes?
.any?
end
 
def targeting_stable_branch?
/^[\d-]+-stable(-ee|-jh)?$/.match?(ENV['CI_MERGE_REQUEST_TARGET_BRANCH_NAME'])
end
def quarantine_changes?
return false if mr_diff.empty?
return false if mr_diff.any? { |change| change[:new_file] || change[:deleted_file] }
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment