ci: check missing runners only when needed

pull/13557/merge
Fu Hanxi 2024-04-08 12:21:50 +02:00
rodzic af302c0bee
commit ed2d492bde
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 19399699CF3C4B16
3 zmienionych plików z 3 dodań i 25 usunięć

Wyświetl plik

@ -264,7 +264,6 @@ generate_build_child_pipeline:
dependencies: # set dependencies to null to avoid missing artifacts issue
needs:
- pipeline_variables
- check_test_cases_env_markers_and_required_runners
artifacts:
paths:
- build_child_pipeline.yml

Wyświetl plik

@ -166,10 +166,3 @@ pipeline_variables:
- pipeline.env
expire_in: 1 week
when: always
check_test_cases_env_markers_and_required_runners:
extends:
- .pre_check_template
tags: [fast_run, shiny]
script:
- python tools/ci/dynamic_pipelines/scripts/generate_target_test_child_pipeline.py --check

Wyświetl plik

@ -28,9 +28,7 @@ from dynamic_pipelines.utils import dump_jobs_to_yaml
from gitlab.v4.objects import Project
from gitlab_api import Gitlab
from idf_build_apps import App
from idf_build_apps.constants import BuildStatus
from idf_ci.app import import_apps_from_txt
from idf_pytest.script import get_all_apps
from idf_pytest.script import get_pytest_cases
@ -187,13 +185,6 @@ if __name__ == '__main__':
default=DEFAULT_TARGET_TEST_CHILD_PIPELINE_FILEPATH,
help='Output child pipeline file path',
)
parser.add_argument(
'--check',
action='store_true',
help='Check if the child pipeline could be generated successfully. '
'test cases without env marker or required unset runner will be printed out. '
'(Note: All apps and test cases will be checked)',
)
parser.add_argument(
'--app-info-filepattern',
default='list_job_*.txt',
@ -206,14 +197,9 @@ if __name__ == '__main__':
gl_project = Gitlab(args.project_id).project
if args.check:
apps = list(get_all_apps(args.paths)[0]) # test related apps only
for app in apps:
app.build_status = BuildStatus.SUCCESS # pretend they are built successfully
else:
apps = []
for f in glob.glob(args.app_info_filepattern):
apps.extend(import_apps_from_txt(f))
apps = []
for f in glob.glob(args.app_info_filepattern):
apps.extend(import_apps_from_txt(f))
generate_target_test_child_pipeline(
gl_project,