Skip to content

Commit 79d4826

Browse files
committed
DNM Add molecule jobs from edpm-ansible
The edpm-ansible folks would like to run own job also when our changes are related to molecule job. Let's trigger some of they jobs here. Signed-off-by: Daniel Pawlik <[email protected]>
1 parent dfb9a8c commit 79d4826

File tree

4 files changed

+25
-2
lines changed

4 files changed

+25
-2
lines changed

ci/playbooks/molecule-test.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22
- name: "Run ci/playbooks/molecule-test.yml"
33
hosts: "{{ cifmw_zuul_target_host | default('controller') }}"
44
gather_facts: false
5+
vars:
6+
zuul:
7+
branch: main
8+
items:
9+
- project:
10+
short_name: ci-framework
11+
name: openstack-k8s-operators/ci-framework
12+
src_dir: src/github.com/openstack-k8s-operators/ci-framework
513
tasks:
614
- name: Gather required facts
715
ansible.builtin.setup:

roles/cifmw_cephadm/molecule/default/molecule.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
---
22
# Mainly used to override the defaults set in .config/molecule/
33
# By default, it uses the "config_podman.yml" - in CI, it will use
4-
# "config_local.yml".
4+
# "config_local.yml"
5+
#
56
log: true
67

78
provisioner:

scripts/create_role_molecule.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@
2020
import logging
2121
from jinja2 import Environment, FileSystemLoader
2222

23+
additional_molecule_jobs = [
24+
"edpm-ansible-molecule-edpm_kernel",
25+
"edpm-ansible-molecule-edpm_podman",
26+
"edpm-ansible-molecule-edpm_ovs",
27+
]
2328

2429
def get_project_paths(project_dir=None):
2530
"""
@@ -90,7 +95,13 @@ def regenerate_projects_zuul_jobs_yaml(generated_paths):
9095
f"cifmw-molecule-{role_directory.name}"
9196
)
9297

93-
with open(generated_paths["zuul_job_dir"] / "projects.yaml", "w") as projects_file:
98+
if additional_molecule_jobs:
99+
for additional_job in additional_molecule_jobs:
100+
projects_jobs_info[0]["project"]["github-check"]["jobs"].append(
101+
additional_job)
102+
103+
with open(generated_paths["zuul_job_dir"] / "projects.yaml",
104+
"w") as projects_file:
94105
yaml.dump(projects_jobs_info, projects_file)
95106

96107

zuul.d/projects.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,9 @@
104104
- cifmw-molecule-update_containers
105105
- cifmw-molecule-validations
106106
- cifmw-molecule-virtualbmc
107+
- edpm-ansible-molecule-edpm_kernel
108+
- edpm-ansible-molecule-edpm_podman
109+
- edpm-ansible-molecule-edpm_ovs
107110
github-post:
108111
jobs:
109112
- build-push-container-cifmw-client-post

0 commit comments

Comments
 (0)