Public Access
DEVX-148: fix: unique molecule container names per CI runner
Co-authored-by: kireto <kireto@oblachno.com>
This commit was merged in pull request #240.
This commit is contained in:
@@ -125,6 +125,11 @@ def build_env_for_pair(pair: str, base_env: dict[str, str]) -> dict[str, str]:
|
||||
"""Build environment for a single molecule pair."""
|
||||
_role, _scenario, platform_name, platform_image, platform_command = parse_pair(pair)
|
||||
env = base_env.copy()
|
||||
# Append runner index to platform name when running in CI matrix to avoid
|
||||
# Docker container name conflicts when multiple runners share the same Docker host.
|
||||
matrix_index = env.get("MATRIX_INDEX")
|
||||
if matrix_index:
|
||||
platform_name = f"{platform_name}-r{matrix_index}"
|
||||
env["MOLECULE_PLATFORM_NAME"] = platform_name
|
||||
env["MOLECULE_PLATFORM_IMAGE"] = platform_image
|
||||
if platform_command:
|
||||
|
||||
Reference in New Issue
Block a user