Skip to content
Snippets Groups Projects
Unverified Commit 98f1ed0f authored by Andrejs Cunskis's avatar Andrejs Cunskis Committed by GitLab
Browse files

Merge branch 'hm-disable-selective-for-backports' into 'master'

Disable selective execution when target branch is stable branch

See merge request https://gitlab.com/gitlab-org/gitlab/-/merge_requests/169426



Merged-by: default avatarAndrejs Cunskis <acunskis@gitlab.com>
Approved-by: default avatarAndrejs Cunskis <acunskis@gitlab.com>
Reviewed-by: default avatarAndrejs Cunskis <acunskis@gitlab.com>
Co-authored-by: default avatarhmuralidhar <hmuralidhar@gitlab.com>
parents 6c47f2dd 0ab8c735
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