zuul-jobs/test-playbooks/base-roles/prepare-workspace-git.yaml
James E. Blair 91a0d9b312 Update the base-roles test to use prepare-workspace-git
This is what this job should have been testing, as it's what we
recommend people use.  We simply didn't notice that OpenDev never
finished the transition away from use-cached-repos (which isn't
even defined in this repo).

Change-Id: I9be05f9c035441c3a0f84206b25580263663d179
2019-09-06 07:13:41 -07:00

25 lines
863 B
YAML

- name: Test the prepare-workspace-git role
hosts: all
roles:
- role: prepare-workspace-git
post_tasks:
# opendev/base-jobs is in 'required-projects'.
# Also check that the project being tested is being prepared.
# We're checking them explicitly rather than with_items on zuul.projects
# in case there is a regression which would take an item out.
- name: Check that opendev/base-jobs was prepared
stat:
path: "{{ ansible_user_dir }}/src/opendev.org/opendev/base-jobs"
register: base_jobs
- name: Check this project was prepared
stat:
path: "{{ ansible_user_dir }}/src/{{ zuul.project.canonical_name }}"
register: self_config
- name: Validate that required projects have been prepared
assert:
that:
- base_jobs.stat.exists
- self_config.stat.exists