Compared to the existing Debian-based x86_64_pyutils container, this Alpine-based variant reduces the image size by approximately 83%. Include all the necessary python artifacts, including lava_job_submitter in the container to avoid having to download them at the start of each test job. Signed-off-by: Valentine Burley <valentine.burley@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34980>
21 lines
467 B
Python
21 lines
467 B
Python
# When changing this file, you need to bump the following
|
|
# .gitlab-ci/image-tags.yml tags:
|
|
# ALPINE_X86_64_LAVA_TRIGGER_TAG
|
|
|
|
import logging
|
|
import os
|
|
|
|
|
|
def get_lava_farm() -> str:
|
|
"""
|
|
Returns the LAVA farm based on the FARM environment variable.
|
|
|
|
:return: The LAVA farm
|
|
"""
|
|
farm: str = os.getenv("FARM", "unknown")
|
|
|
|
if farm == "unknown":
|
|
logging.warning("FARM environment variable is not set, using unknown")
|
|
|
|
return farm.lower()
|