Jiri Podivin 200e8211ec Centos 9 jobs for validations common
Recent move to centos9 nodes has disabled the jobs we rely on.
By moving our jobs to centos9 we can keep our coverage.

The reqcheck job no longer pulls python3-virtualenv package
as it was removed from centos9 stream.

The molecule jobs have been kept on centos-8.

Signed-off-by: Jiri Podivin <jpodivin@redhat.com>
Change-Id: I36a07afc6dc76d47db7b8d4c3538b74bd5a1a48e
2022-03-15 07:50:51 +00:00

45 lines
1.5 KiB
YAML

---
- hosts: all
name: validations-common-reqcheck
vars:
req_check_override: "{{ ansible_user_dir }}/{{ zuul.project.src_dir }}/.reqcheck_override.yaml"
tasks:
- name: Install rdopkg
changed_when: true
shell:
cmd: |
set -e
# Need to inherit system-site-packages for python-yum
python3 -m venv --system-site-packages {{ ansible_user_dir }}/.venv
source {{ ansible_user_dir }}/.venv/bin/activate
git clone https://github.com/softwarefactory-project/rdopkg.git
cd rdopkg
pip install .
args:
chdir: "{{ ansible_user_dir }}"
- name: Get distgit project info
changed_when: true
shell:
cmd: |
set -e
source {{ ansible_user_dir }}/.venv/bin/activate
rdopkg findpkg {{ zuul.project.name }} | sed -n "/^distgit/ s/distgit. \(.*\)/\1/p"
register: distgit
args:
chdir: "{{ ansible_user_dir }}"
- name: Clone distgit and reqcheck {{ zuul.project.name }} with rdopkg
changed_when: true
shell:
cmd: |
set -e
source {{ ansible_user_dir }}/.venv/bin/activate
git clone {{ distgit.stdout }}
cd validations-common-distgit
git remote add upstream {{ ansible_user_dir }}/{{ zuul.project.src_dir }}
git fetch upstream
rdopkg reqcheck --strict --override {{ req_check_override }}
args:
chdir: "{{ ansible_user_dir }}"