CI: add wf class in ci_config

#do_not_test
This commit is contained in:
Max Kainov 2024-03-09 13:43:37 +00:00
parent 1c44f3d091
commit 7f061ba89c
2 changed files with 11 additions and 2 deletions

View File

@ -1111,7 +1111,7 @@ def _configure_jobs(
digests: Dict[str, str] = {}
print("::group::Job Digests")
for job in CI_CONFIG.job_generator():
for job in CI_CONFIG.job_generator(pr_info.head_ref):
digest = job_digester.get_job_digest(CI_CONFIG.get_digest_config(job))
digests[job] = digest
print(f" job [{job.rjust(50)}] has digest [{digest}]")

View File

@ -11,6 +11,14 @@ from ci_utils import WithIter
from integration_test_images import IMAGES
class WorkFlows(metaclass=WithIter):
PULL_REQUEST = "PULL_REQUEST"
MASTER = "MASTER"
BACKPORT = "BACKPORT"
RELEASE = "RELEASE"
SYNC = "SYNC"
class CIStages(metaclass=WithIter):
NA = "UNKNOWN"
BUILDS_1 = "Builds_1"
@ -694,10 +702,11 @@ class CIConfig:
), f"Invalid check_name or CI_CONFIG outdated, config not found for [{check_name}]"
return res # type: ignore
def job_generator(self) -> Iterable[str]:
def job_generator(self, branch: str) -> Iterable[str]:
"""
traverses all check names in CI pipeline
"""
assert branch
for config in (
self.other_jobs_configs,
self.build_config,