Skip to content

Commit

Permalink
Use the cifmw venv to run VA validations
Browse files Browse the repository at this point in the history
In zuul VA validation jobs we are installing via setup_molecule
the cifmw collection and dependencies but we are using the zuul
executor venv, leading to missing deps like custom filters or
jmespath missing.
  • Loading branch information
pablintino committed May 31, 2024
1 parent 61f9c0c commit 374313a
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ architecture_test_nodeps: ## Run architecture-test without any dependency instal
$(call check-var-defined,NET_ENV_FILE)
cp -r ${ARCH_REPO} /tmp/local-arch-repo;
ansible-playbook -i localhost, -c local \
ci/playbooks/validate-architecture.yml \
ci/playbooks/architecture/validate-architecture.yml \
-e cifmw_zuul_target_host=localhost \
-e ansible_user_dir=/tmp \
-e cifmw_architecture_repo=/tmp/local-arch-repo \
Expand Down
18 changes: 18 additions & 0 deletions ci/playbooks/architecture/run.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
- name: "Run ci/playbooks/architecture/validate-architecture.yml"
hosts: "{{ cifmw_zuul_target_host | default('all') }}"
gather_facts: true
tasks:
- name: Filter out host if needed
when:
- cifmw_zuul_target_host is defined
- cifmw_zuul_target_host != 'all'
- inventory_hostname != cifmw_zuul_target_host
ansible.builtin.meta: end_host

- name: Run Podified EDPM deployment
ansible.builtin.command:
chdir: "{{ ansible_user_dir }}/src/github.com/openstack-k8s-operators/ci-framework"
cmd: >-
ansible-playbook -i localhost, -c local
ci/playbooks/architecture/validate-architecture.yml
File renamed without changes.
4 changes: 2 additions & 2 deletions zuul.d/architecture-jobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Base job defined for the architecture related jobs.
# Mostly, they are "linters", ensuring we're able to read
# and build content based on the automation file.
# You can refer to the ci/playbooks/validate-architecture.yml
# You can refer to the ci/playbooks/architecture/validate-architecture.yml
# playbook for more information about the playbook capabilities.

- job:
Expand All @@ -23,7 +23,7 @@
| path_join
}}
run:
- ci/playbooks/validate-architecture.yml
- ci/playbooks/architecture/run.yml
required-projects:
- openstack-k8s-operators/architecture

Expand Down

0 comments on commit 374313a

Please sign in to comment.