
This patch: - adds a basic skeleton role for tripleo_ipa generated from molecule - trivial additions to .gitignore - adds molecule-requirements.txt - invokes molecule using tox - adds basic plumbing so that we can invoke tests using zuul and locally with some handy scripts Each entry above was originally its own patch. We're consolidating them into a single patch so that we can introduce zuul, which needs to verify patches before we can merge them. If you want to run tests locally, you can use the `scripts/run-local-test` script: $ bash scripts/run-local-test Which will setup dependencies from zuul, install a virtualenv, and invoke tox. Change-Id: If9446f5597d0150a2694e655dbb45475ce38a426
36 lines
1.2 KiB
YAML
36 lines
1.2 KiB
YAML
---
|
|
|
|
- hosts: all
|
|
pre_tasks:
|
|
- name: Set project path fact
|
|
set_fact:
|
|
tripleo_ipa_project_path: "{{ ansible_user_dir }}/{{ zuul.projects['opendev.org/x/tripleo-ipa'].src_dir }}"
|
|
|
|
- name: Ensure output dirs
|
|
file:
|
|
path: "{{ ansible_user_dir }}/zuul-output/logs"
|
|
state: directory
|
|
|
|
- name: Setup test-python
|
|
pip:
|
|
requirements: "{{ tripleo_ipa_project_path }}/molecule-requirements.txt"
|
|
virtualenv: "{{ ansible_user_dir }}/test-python"
|
|
virtualenv_site_packages: true
|
|
|
|
- name: Display test-python virtualenv package versions
|
|
shell: |-
|
|
. {{ ansible_user_dir }}/test-python/bin/activate
|
|
pip freeze
|
|
|
|
# NOTE(cloudnull): This is being done because docker is not supported on RHEL-8
|
|
# and tests within this repo still require docker.
|
|
- name: Manually install containerd.io
|
|
become: true
|
|
package:
|
|
name: https://download.docker.com/linux/centos/7/x86_64/stable/Packages/containerd.io-1.2.6-3.3.el7.x86_64.rpm
|
|
when:
|
|
- (ansible_distribution_major_version | int) >= 8
|
|
roles:
|
|
# docker is needed by multiple molecule scenarios
|
|
- role: install-docker
|