CI: convert molecule jobs to parallel:matrix

With the new provisionning using kubevirt this should be faster.
This commit is contained in:
Max Gautier
2025-03-11 11:47:17 +01:00
parent f70c33d71a
commit 315313dd10
4 changed files with 31 additions and 59 deletions

View File

@@ -1,6 +1,6 @@
---
- name: Include custom vars for ci job
include_vars: "../files/{{ ci_job_name }}.yml"
include_vars: "../files/{{ lookup('ansible.builtin.env', 'CI_JOB_NAME') }}.yml"
when: molecule_yml is not defined
- name: Generate SSH keypair

View File

@@ -13,7 +13,7 @@ metadata:
kubevirt.io/os: {{ cloud_image }}
kubevirt.io/size: small
ci_job_id: "{{ ci_job_id }}"
ci_job_name: "{{ ci_job_name }}"
ci_job_name: "{{ lookup('ansible.builtin.env', 'CI_JOB_NAME_SLUG') }}"
# leverage the Kubernetes GC for resources cleanup
ownerReferences:
- apiVersion: v1

View File

@@ -31,7 +31,6 @@ scenarios:
# Get pod metadata / CI vars from environment
ci_job_id: "{{ lookup('ansible.builtin.env', 'CI_JOB_ID', default=undefined) }}"
ci_job_name: "{{ lookup('ansible.builtin.env', 'CI_JOB_NAME', default=undefined) }}"
pod_name: "{{ lookup('ansible.builtin.env', 'POD_NAME', default=undefined) }}"
pod_uid: "{{ lookup('ansible.builtin.env', 'POD_UID', default=undefined) }}"
pod_namespace: "{{ lookup('ansible.builtin.env', 'POD_NAMESPACE', default=undefined) }}"