Include the tests chunk, if set, in the VM name

Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
This commit is contained in:
Pedro Algarvio 2022-10-04 11:17:28 +01:00 committed by Megan Wilhite
parent a4247b6a1d
commit ec9a456c49
2 changed files with 14 additions and 1 deletions

View file

@ -132,6 +132,8 @@ jobs:
- name: Start VM
id: spin-up-vm
env:
TESTS_CHUNK: ${{ matrix.tests-chunk }}
run: |
tools vm create ${{ inputs.distro-slug }}

View file

@ -516,7 +516,18 @@ class VM:
ref = f"tag-{ref.split('/')[-1]}"
else:
ref = ref.split("/")[-1]
name = f"{self.name} - {repo} - {ref} - {job} - {actor}"
tests_chunk = os.environ.get("TESTS_CHUNK")
if tests_chunk is None:
tests_chunk = ""
else:
tags.append(
{
"Key": "TESTS_CHUNK",
"Value": tests_chunk,
}
)
tests_chunk = f" - {tests_chunk}"
name = f"{self.name} - {repo} - {ref} - {job}{tests_chunk} - {actor}"
for key in os.environ:
if not key.startswith("GITHUB_"):
continue