ci/lava: Use project_name instead of hardcoded mesa
The LAVA job submitter is being used by other fd.o projects, such as `drm/ci`, so let's make it generate more generic job definitions and test cases. Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25912>
This commit is contained in:

committed by
Marge Bot

parent
a1e6879021
commit
f7f2d26e3b
@@ -58,4 +58,5 @@ PYTHONPATH=artifacts/ artifacts/lava/lava_job_submitter.py \
|
||||
--mesa-job-name "$CI_JOB_NAME" \
|
||||
--structured-log-file "results/lava_job_detail.json" \
|
||||
--ssh-client-image "${LAVA_SSH_CLIENT_IMAGE}" \
|
||||
--project-name "${CI_PROJECT_NAME}" \
|
||||
>> results/lava.log
|
||||
|
@@ -379,6 +379,7 @@ class LAVAJobSubmitter(PathResolver):
|
||||
job_rootfs_overlay_url: str = None
|
||||
structured_log_file: pathlib.Path = None # Log file path with structured LAVA log
|
||||
ssh_client_image: str = None # x86_64 SSH client image to follow the job's output
|
||||
project_name: str = None # Project name to be used in the job name
|
||||
__structured_log_context = contextlib.nullcontext() # Structured Logger context
|
||||
|
||||
def __post_init__(self) -> None:
|
||||
|
@@ -81,7 +81,7 @@ def to_yaml_block(steps_array: list[str], escape_vars=[]) -> LiteralScalarString
|
||||
def generate_metadata(args) -> dict[str, Any]:
|
||||
# General metadata and permissions
|
||||
values = {
|
||||
"job_name": f"mesa: {args.pipeline_info}",
|
||||
"job_name": f"{args.project_name}: {args.pipeline_info}",
|
||||
"device_type": args.device_type,
|
||||
"visibility": {"group": [args.visibility_group]},
|
||||
"priority": JOB_PRIORITY,
|
||||
|
@@ -155,7 +155,7 @@ def generate_docker_test(args):
|
||||
"export SSH_PTY_ARGS=-tt",
|
||||
# Putting CI_JOB name as the testcase name, it may help LAVA farm
|
||||
# maintainers with monitoring
|
||||
f"lava_ssh_test_case 'mesa-ci_{args.mesa_job_name}' "
|
||||
f"lava_ssh_test_case '{args.project_name}_{args.mesa_job_name}' "
|
||||
# Changing directory to /, as the HWCI_SCRIPT expects that
|
||||
"'\"cd / && /init-stage2.sh\"'",
|
||||
]
|
||||
|
@@ -150,7 +150,7 @@ def generate_lava_yaml_payload(args) -> dict[str, Any]:
|
||||
"sleep 1",
|
||||
# Putting CI_JOB name as the testcase name, it may help LAVA farm
|
||||
# maintainers with monitoring
|
||||
f"lava-test-case 'mesa-ci_{args.mesa_job_name}' --shell /init-stage2.sh",
|
||||
f"lava-test-case '{args.project_name}_{args.mesa_job_name}' --shell /init-stage2.sh",
|
||||
]
|
||||
|
||||
if args.boot_method == "fastboot":
|
||||
|
Reference in New Issue
Block a user