Make local molecule testing running.
There has been an update in the zuul fact's structure, having now a projects index which contains the src_dir parameter. This update was done in run.yaml, however it was missed to be adapted for the run-local.yml and the pre.yml. This change adds the fact tripleo_validations_project_path in pre.yml and updates the zuul dictionary in run-local.yml. Change-Id: I25ccc7d7a70a64c5abc1a5d621817b2dfad6e38f
This commit is contained in:
parent
3e4d00446f
commit
dbde87964e
|
@ -1,6 +1,10 @@
|
|||
---
|
||||
- hosts: all
|
||||
pre_tasks:
|
||||
- name: Set project path fact
|
||||
set_fact:
|
||||
tripleo_validations_project_path: "{{ ansible_user_dir }}/{{ zuul.projects['opendev.org/openstack/tripleo-validations'].src_dir }}"
|
||||
|
||||
- name: Ensure output dirs
|
||||
file:
|
||||
path: "{{ ansible_user_dir }}/zuul-output/logs"
|
||||
|
@ -19,13 +23,13 @@
|
|||
- name: Run bindep
|
||||
shell: |-
|
||||
. {{ ansible_user_dir }}/test-python/bin/activate
|
||||
{{ ansible_user_dir }}/{{ zuul.project.src_dir }}/scripts/bindep-install
|
||||
{{ tripleo_validations_project_path }}/scripts/bindep-install
|
||||
become: true
|
||||
changed_when: false
|
||||
|
||||
- name: Setup test-python
|
||||
pip:
|
||||
requirements: "{{ ansible_user_dir }}/{{ zuul.project.src_dir }}/molecule-requirements.txt"
|
||||
requirements: "{{ tripleo_validations_project_path }}/molecule-requirements.txt"
|
||||
virtualenv: "{{ ansible_user_dir }}/test-python"
|
||||
virtualenv_site_packages: true
|
||||
|
||||
|
@ -33,7 +37,7 @@
|
|||
- name: Get necessary git repos
|
||||
git:
|
||||
repo: https://opendev.org/openstack/{{ item }}
|
||||
dest: "{{ ansible_user_dir}}/{{ zuul.project.src_dir }}/roles/roles.galaxy/{{ item }}"
|
||||
dest: "{{ tripleo_validations_project_path }}/roles/roles.galaxy/{{ item }}"
|
||||
version: master
|
||||
force: true
|
||||
with_items:
|
||||
|
|
|
@ -4,8 +4,9 @@
|
|||
- name: set basic zuul fact
|
||||
set_fact:
|
||||
zuul:
|
||||
project:
|
||||
src_dir: "{{ tripleo_src }}"
|
||||
projects:
|
||||
"opendev.org/openstack/tripleo-validations":
|
||||
src_dir: "{{ tripleo_src }}"
|
||||
ansible_connection: ssh
|
||||
|
||||
- import_playbook: pre.yml
|
||||
|
|
Loading…
Reference in New Issue