Merge branch 'ci/check_missing_runner_only_when_needed' into 'master'

ci: check missing runners only when needed

See merge request espressif/esp-idf!30103
This commit is contained in:
Jakob Hasse 2024-04-22 23:11:32 +08:00
commit 3ef14f52eb
3 changed files with 3 additions and 25 deletions

View File

@ -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

View File

@ -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

View File

@ -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,