diff --git a/tools/azure-sdk-tools/ci_tools/environment_exclusions.py b/tools/azure-sdk-tools/ci_tools/environment_exclusions.py index b14418aec906..fc09f3f15e4b 100644 --- a/tools/azure-sdk-tools/ci_tools/environment_exclusions.py +++ b/tools/azure-sdk-tools/ci_tools/environment_exclusions.py @@ -5,7 +5,7 @@ # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- from ci_tools.parsing import get_config_setting -from ci_tools.variables import in_public +from ci_tools.variables import in_public, in_analyze_weekly import os from typing import Any @@ -53,7 +53,7 @@ def is_check_enabled(package_path: str, check: str, default: Any = True) -> bool package_path = os.getcwd() ci_enabled = get_config_setting(package_path, "ci_enabled", True) - if not in_public() and ci_enabled is False: + if not in_public() and not in_analyze_weekly() and ci_enabled is False: return False # now pull the new pyproject.toml configuration diff --git a/tools/azure-sdk-tools/ci_tools/variables.py b/tools/azure-sdk-tools/ci_tools/variables.py index 530d56a85eac..ba6d13d75965 100644 --- a/tools/azure-sdk-tools/ci_tools/variables.py +++ b/tools/azure-sdk-tools/ci_tools/variables.py @@ -67,6 +67,13 @@ def in_public() -> int: return 0 +def in_analyze_weekly() -> int: + # Returns 4 if the build originates from the tests-weekly analyze job + # 0 otherwise + if "tests-weekly" in os.getenv("SYSTEM_DEFINITIONNAME", "") and os.getenv("SYSTEM_STAGEDISPLAYNAME", "") == "Analyze_Test": + return 4 + return 0 + DEV_BUILD_IDENTIFIER = os.getenv("SDK_DEV_BUILD_IDENTIFIER", "a") DEFAULT_BUILD_ID = os.getenv("GITHUB_RUN_ID", os.getenv("BUILD.BUILDID", os.getenv("SDK_BUILD_ID", "20220101.1")))